A method for augmenting an AI prompt with personally1 contextualised data that is unknown to a Large Language Model. Documents are converted into vectors which are queried by a semantic search and added to the AI prompt before being sent to the LLM.
flowchart TD subgraph Preparation Document@{ shape: docs, label: "Documents, Images, etc." } -->|chunks| model(Embedding Model) model-->|vectors| vectorDB(Vector Database) end subgraph "User Prompt" Input@{ shape: lean-r, label: "User Prompt" } Input -->|semantic search| vectorDB vectorDB -->|extends| Context(Contextualised Prompt) Context --> LLM end
Long context prompting is an alternative to Retrieval Augmented Generation
Source: Is RAG Still Needed? Choosing the Best Approach for LLMs - YouTube
Footnotes
-
Personal as in not publicly known outside of an individual, family or business. ↩
