a.k.a. Retrieval-augmented generation
Allow LLMs use data outside of their training set, by:
- Querying a large dataset (e.g. a db) for information relevant to your query.
- Including that information in the LLM prompt
Example:
- Load documents (websites, PDFs, .md files)
- Create embeddings for the documents
- Store them in a vector db (e.g. sqlite w. a vector extension or ChromaDB)
- Find the closest documents in a vector db given the query
- Pass those documents to the LLM prompt as context
- Return the prompt result