Best of RAGSeptember 2024

  1. 1
    Article
    Avatar of gopenaiGoPenAI·2y

    Build an Advanced RAG App: Query Routing

    This post explores how to build an advanced RAG application using a technique called Query Routing. Query Routing enables the application to make decisions based on a user's query, selecting the most appropriate action from predefined choices such as retrieving context from multiple data sources, using different indexes, or performing a web search. Various types of Query Routers are discussed, including LLM Selector Router, LLM Function Calling Router, Semantic Router, and more. Example implementations demonstrate how to create Query Routers and enhance the decision-making capabilities of RAG applications.

  2. 2
    Article
    Avatar of communityCommunity Picks·2y

    Building an Advanced RAG System With Self-Querying Retrieval

    Learn how to build an advanced Retrieval Augmented Generation (RAG) system that leverages self-querying retrieval to improve search relevance. This tutorial covers extracting metadata filters from natural language queries, combining metadata filtering with vector search, and generating structured outputs using LLMs. The guide focuses on developing an investment assistant to answer financial questions using MongoDB as the vector store and LangGraph for orchestration.

  3. 3
    Article
    Avatar of gopenaiGoPenAI·2y

    Dynamic Routing in RAG: Directing User Queries to the Right Vector Store with Open Source Models

    Generative AI applications can be optimized by integrating a semantic routing mechanism in the Retrieval-Augmented Generation (RAG) framework. This involves analyzing user queries and directing them to the most relevant vector stores, enhancing both accuracy and efficiency. The post demonstrates implementing a semantic router using a Nomic embedding model and Llama 3.1 for embeddings, covering machine learning, computer science, and economics topics. Advanced techniques like Multi-query translation and HyDE further refine the process, ensuring users receive pertinent information from diverse sources.

  4. 4
    Article
    Avatar of infoworldInfoWorld·2y

    Using PostgreSQL as a vector database in RAG

    Learn how to build a local retrieval-augmented generation (RAG) application using PostgreSQL with the pgvector extension, Ollama, and the Llama 3 large language model. This guide describes how Postgres can store both vector and tabular data, making it a versatile option for medium-sized RAG applications. It covers setting up a vector database, ingesting text from multiple sources, conducting similarity searches, and querying a large language model to generate answers. Practical coding examples and step-by-step instructions are provided to help developers get started quickly.

  5. 5
    Article
    Avatar of redislabsRedis·2y

    Get better RAG responses with Ragas

    Many teams struggle to measure the performance of their Retrieval Augmented Generation (RAG) applications due to issues like hallucinations and incorrect data. A metrics-driven approach, using frameworks like RAG Assessment (Ragas), can improve evaluation by quantitatively measuring faithfulness, answer relevancy, context precision, and context recall. This ensures engineers can optimize their systems without relying on anecdotal evidence. Using tools like OpenAI, LangChain, and Redis, developers can establish and test baseline metrics efficiently.

  6. 6
    Video
    Avatar of vscodeVisual Studio Code·2y

    Building a RAG application with a PostgreSQL database

    Learn how to build a Retrieval Augmented Generation (RAG) application using PostgreSQL from scratch. RAG leverages large language models to answer questions accurately by providing relevant information from databases. The post walks through setting up PostgreSQL with the PG Vector extension, creating embeddings for semantic search, and combining full-text and vector search techniques for optimal results. It also highlights the importance of query rewriting and discusses options for using local and hosted models for embedding.

  7. 7
    Article
    Avatar of newstackThe New Stack·2y

    Boost LLM Results: When to Use Knowledge Graph RAG

    Retrieval-augmented generation (RAG) systems sometimes fail to go deep enough into document sets, leading to shallow or incorrect responses. Using knowledge graphs can enhance RAG systems by connecting related documents more effectively. This method is especially useful for legal documents, technical documentation, research publications, and interconnected websites. Knowledge graphs use well-defined connections like HTML links, specialized keywords, and document structures to improve information retrieval and accuracy.