procedure
The process for preparing documents for retrieval-augmented generation (RAG) involves five steps: (1) Chunk the text by splitting documents into multiple chunks, (2) Generate embeddings by using a text embedding model to create vector representations of the text chunks, (3) Encode the user query by converting the input question into a vector at query time, (4) Perform similarity search by applying algorithms like cosine similarity to compare the distance between the user input vector and the embedded text chunks, and (5) Retrieve top matches by returning the most similar documents to provide context to the large language model.

Authors

Sources

Referenced by nodes (3)