Please enable JavaScript.
Coggle requires JavaScript to display documents.
RAG and Agentic Search - Coggle Diagram
RAG and Agentic Search
RAG
s a technique that helps you work with large documents that are too big to fit into a single prompt
Retrieval Augmented Generation
Breaks documents intro chuncks and include only the most relevant pieces when answering questions
Options
Break the document up in many chunkcs & put chuncks relevant to the users questsions promps
Include the contents of the document in the prompt (not the best option)
Text chunking strategies
Chunking strategires
Structured based
Divide text based upon the structure
Semantic based
Device text intro gropups of related senteces or sections
Size based
Divide text intro strings of equal lenght
Text embeggings
Semantic search
Utilize text embedding to better understand the users questions
Text embedding
Generated by a embedding model
Numeric representation of the meaning conained in some text
Each number is a "score"
Emebedding could be generated by Voyage AI (extenal provider)
RAG Flow
Steps
Embeddings for each text
Normalization
Chuck in pieces of text
Store embeddings in vector DB
BM25 Lexical Search
Semantic search deosn't return best results
Lexical search
Basic search
Invoke both systems in paralel and combine results
BM25 = Best match 25