Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Ragtime! Add RAG capability to stack! (WIP!) #128

Closed
wants to merge 4 commits into from
Closed

Conversation

mbilokonsky
Copy link
Contributor

This is a WIP commit so far, represents current state of this thing but is not yet tested.

Things to note:

  1. piggypacking onto the pinecone vector store
  2. currently I'm using separate index names for different pinecone use cases, 'concepts' vs 'rag' - we may want a single index with namespaces.
  3. this RAG is currently hard-coded to fit the schema of the SQL dump provided, we can tune that.
  4. I'm using unusually large chunk sizes, because we are using a large context window. We may not want that.
  5. What ultimately gets returned is a queryEngine, which allows you to ask questions and it'll route the question through the whole pipeline. This would be an alternative way to query LLMs.

Note that right now we're hard-coded to OpenAI, but we could trivially replace that with Anthropic etc if we wanted to.

Next steps for me as of current commit: I need to actually run this and make sure it behaves in the ways that I expect. I want specifically to confirm that it persists as anticipated in Pinecone, and that re-running it is idempotent and doesn't rebuild the index on every operation - the docs weren't entirely clear for me in that regard.

But, this should serve as a sort of template for RAG-style work within CB. We can take this in various directions - we could hard-code different rags for different sources, we could parameterize this and make the whole thing filter on metadata so a given query only pulls from specific sources, we could merge this into a single index, etc. There are also a ton of third-party libs that integrate with this, so from this baseline we can really expand in any direction.

@mbilokonsky mbilokonsky added the WIP This PR is a work in progress, not intended to be merged yet. label Mar 27, 2024
Copy link

vercel bot commented Mar 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
course-builder-docs ✅ Ready (Inspect) Visit Preview Mar 27, 2024 0:21am
course-builder-poc ✅ Ready (Inspect) Visit Preview Mar 27, 2024 0:21am

@github-actions github-actions bot added the apps label Mar 27, 2024
@joelhooks joelhooks closed this Mar 27, 2024
@joelhooks joelhooks deleted the ragtime branch March 27, 2024 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apps WIP This PR is a work in progress, not intended to be merged yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants