James Briggs Profile picture
May 4 6 tweets 2 min read Twitter logo Read on Twitter
#LLMs like GPT-4 are stuck in time — they only understand the world as it exists within their training data...

This causes issues when we need up-to-date info or interaction with specific datasets — here's how we fix that

pinecone.io/learn/langchai…
🔍📚 Retrieval augmentation uses an external knowledge base as a "window" into the world — we explore how to implement this for LLMs using @LangChainAI, reducing hallucinations and keeping info up to date
📖🔧 To give LLMs relevant source knowledge, we create a knowledge base:
- We start with a dataset (e.g., a subset of Wikipedia)
- Split it into chunks
- Generate embeddings (numerical representations) of the "human meaning" behind each chunk
🌐🗃️ We store these embeddings in the @pinecone vector database, which can scale to billions of records and help us manage this knowledge efficiently — we just add, delete, and update records!

Much easier than retraining a giant LLM for each new doc 😅
🤖🔗 After this, we can connect LangChain to our vector DB and add an LLM that can generate responses based on the info retrieved from our knowledge base
📜🔖 But we're still not sure if the generated text is hallucinated or not — unfortunately there's no sure-fire way to solve this (yet...)

However, we can help our users by adding citations to the LLM's responses using @LangChainAI's RetrievalQAWithSourcesChain

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with James Briggs

James Briggs Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @jamescalam

Apr 11
I built a ChatGPT @lex_fridman plugin that allows to chat with the collective wisdom contained across 499 of Lex's podcasts and videos... Here's how I built it 🧵

#ChatGPT #ArtificialIntelligence #nlproc #OPStack
Started by:
- downloading Lex MP3s via @YouTube API
- transcribing audio to text with @OpenAI's large Whisper model
- (optional) hosted the new "lex-transcripts" dataset on @huggingface datasets! Image
‼️ The code for the next few steps can be found here:
github.com/pinecone-io/ex…
Read 10 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(