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

Stratechery RAG demo #7

Open
wants to merge 11 commits into
base: cb/function-calling
Choose a base branch
from

Conversation

markbackman
Copy link

@markbackman markbackman commented Sep 6, 2024

RAG demo that uses Stratechery articles as a data source. Some highlights about the implementation:

  • Articles are chunked using a semantic chunking strategy. This allows for content in the articles to be arranged into similar themes.
  • OpenAI text-embedding-3-small is used for embeddings
  • Pinecone is the vector database
  • Langchain is used to query the vector database and construct prompts

The demo indexes the title and published date and the system prompt gets the current date at run time, which allows you to ask questions like: "what was your last article?" or "tell me about what Apple has been up to this year".

The UI contains a drawer that shows you the RAG performance (query time, response time, total RAG time), token utilization (current RAG query and cumulative), and links to the source articles.

Lastly, I've updated the waveform to provide a little more friendly animation during the wait time.

Copy link

vercel bot commented Sep 6, 2024

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

Name Status Preview Updated (UTC)
daily-bots-rag-demo ✅ Ready (Inspect) Visit Preview Sep 18, 2024 0:10am
daily-bots-stratechery-rag-demo 🔄 Building (Inspect) Visit Preview Sep 18, 2024 0:10am
daily-bots-stratechery-rag-demo-1726180589548-Rokr 🛑 Canceled (Inspect) Sep 18, 2024 0:10am
daily-bots-vision ❌ Failed (Inspect) Sep 18, 2024 0:10am
daily-bots-weather-demo ❌ Failed (Inspect) Sep 18, 2024 0:10am
daily-bots-web-demo ✅ Ready (Inspect) Visit Preview Sep 18, 2024 0:10am
rtvi-nextjs ❌ Failed (Inspect) Sep 18, 2024 0:10am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant