RAG Test
Add documents to your knowledge base and test retrieval-augmented generation.
Knowledge Base
3 document(s) indexed
Introduction to RAG
Retrieval-Augmented Generation (RAG) is a technique that enhances LLMs by retrieving relevant documents from a knowledge base before generating a response. It combines the power of retrieval systems with generative AI to provide more accurate and grounded answers.
Vector Embeddings
Vector embeddings are numerical representations of text in high-dimensional space. Similar texts have embeddings that are close together in this space. Models like text-embedding-3-small from OpenAI can convert text into embeddings with 1536 dimensions.
Cosine Similarity
Cosine similarity measures the cosine of the angle between two vectors. It ranges from -1 to 1, where 1 means identical direction (most similar), 0 means orthogonal (unrelated), and -1 means opposite direction. In NLP, it's commonly used to measure semantic similarity between embeddings.
Add Document
Query
Ask a question — the system will retrieve relevant docs and generate an answer.