Replies: 5 comments 9 replies
-
David, I think this sounds great. Thanks for laying out your thinking on this. You filled in a few pieces that I was wondering about. I've started thinking about this and have some thinking that could inform a start. First, to react to a few things you said, I really like the idea of being able to find something with some vague memory of it. Your example of "What was that ChatGPT clone built on Rails that I found on reddit?" I also agree we should do this hybrid search. That jives with the advice I've read. It sounds like good keyword search has some key advantages while vector search has other advantages. You get the best results when you combine both of them. I like your idea for creating feeds from different sources. I'm inclined to get the core models & search capabilities built out first, and then second we can focus on how to effectively populate the information. But I think that's a promising approach. Let me break up some additional thoughts across a few posts, just to help facilitate threading. |
Beta Was this translation helpful? Give feedback.
-
A few high level architecture points: I think we should get this working for OpenAI first before worrying about other LLMs. I think we should use postgres as the vector database rather than adding another dependency. I think the vector search should be done using langchainrb_rails and I think the keyword/text search should use pg_search. I've not implemented either of these so I'm not certain they're the best, but based on some asking around over the past few months I've heard these recommended a few times and I did some reading on each and they look solid. And I think, from the beginning, we should design this to work with multiple types of things that can be remembered. There are three that I have in mind. (1) I'm inclined to jam everything you listed into a model such as Posts because they all share a similar schema (title, some meta data like date, and a big body of text). (2) Conversations that you've having with the AI. "A few weeks ago we were talking about an issue I had configuring redis. What was the solution we came to?" (3) One of the main things I want to add to the app soon is Emails (the AI will help me manage my inbox, everything coming in, and will help compose/reply to emails). Let's just focus on Post from the start, but let's architect it with an eye towards expanding it to Conversations soon after and eventually Email. Keeping multiple models in mind will help us architect this thing in a bit more generic way. I think this can be as simple as creating a Post model with a "search" concern so we're set up to |
Beta Was this translation helpful? Give feedback.
-
Is there one core model or are there multiple? I think we can have a single one that subsumes bookmarks from Reddit, maybe Facebook, Instagram, Twitter, too. I also bookmark regularly on TikTok and YouTube. Those are probably a bit different since they're video content and may need extra considerations like extracting the transcript and capturing visual information ("it was animated video about ..."). I don't think we should design for videos yet, but maybe the initial model could eventually include them, or maybe not. You threw out You mentioned Evernote / OneNote (I use Apple Notes but no API so I may switch to Obsidian or something else). "Post" doesn't feel like quite the right name for that, but the schema feels basically identical: title, body, created, etc. We could push for a name one degree more abstract like "Content", although that feels too vague and I'd expect that to subsume Conversations and Email, which I don't think it should. "Entry" or "Record" are both even more abstract.
We need to figure out what the schema is. In order to do this we should be clear on I think we should consider making things retrievable through three different strategies:
Maybe the schema: Post:
Where would the subreddit of a post be saved? It's inherent in the URL, so maybe that's enough. Maybe we put that in "site", actually. There is probably a better name than "site", maybe "outlet" is slight more generic? WSJ and r/rails both feel like news outlets. |
Beta Was this translation helpful? Give feedback.
-
Assuming the thinking above ^ is roughly on track, the implementation plan may be:
I starting stubbing out those first two tasks to add thinking on implementation. |
Beta Was this translation helpful? Give feedback.
-
Came across this approach to using postgres for RAG: https://github.com/postgresml/korvus |
Beta Was this translation helpful? Give feedback.
-
Here's an idea I've been pondering that could be an interesting & powerful feature for hostedgpt -- I'd love to help contribute and make this a reality!
Background: I'm browsing the web & social media and saving/bookmarking/interacting with blogs, articles, and other content that I find personally interesting & engaging.
User Story:
Sample Example:
I need to spend some time reviewing hostedgpt's design & architecture to see how this could fit in, but at a high-level design here's what I'm thinking:
Then each Article is available for retrieval-augmented generation (RAG), ideally using something like what Microsoft calls hybrid search - using both vector + free-text search and merging the results. (I'm not very well-versed in this space yet so I don't have a lot of opinions / experience on best approach for retrieval & answer generation).
Questions for the collective:
If this sounds like a useful & interesting feature, I'll start digging deeper into design work and figuring out how to bite off small MVP chunks to test & validate the concept!
Beta Was this translation helpful? Give feedback.
All reactions