Code Monkey home page Code Monkey logo

haystack-ragenerator-chatbot's Introduction

What is Haystack ๐Ÿ”ฅ๐Ÿ”ฅ


Haystack is an end-to-end framework that you can use to build powerful and production-ready pipelines with Large Language Models (LLMs) for different search use cases.

โŒ› Usage

perform retrieval-augmented generation (RAG), question answering, or semantic document search, you can use the state-of-the-art LLMs and NLP models in Haystack to provide custom search experiences and make it possible for your users to query in natural language.

๐Ÿ”จ The Building Blocks of Haystack

There are a lot of components you can use to build Haystack search systems:

  • Node
    • it performs different kinds of tasks such as: Preprocessing data, Retrieving documents, Answering questions, Summarizing documents and Routing data.
    • These are often powered by the latest LLMs and transformer models.
  • Pipeline
    • They connect these individual nodes in a specific order to accomplish a particular NLP task.
    • it has different types:
      • Querying Pipelines:
        • it is used to receive a query from the user and produce a result. They have access to a DocumentStore which stores a set of documents.
      • Indexing Pipelines
        • it is used to prepare your files for search. Their main objective is to convert your files into Haystack Documents, so that they can be saved in a DocumentStore.
  • Agent
    • Agents are essentially LLMs equipped with a set of tools (which can be pipelines or individual Haystack nodes).
    • They are used to tackle complex tasks far beyond simple pipelines.
    • Unlike pipelines, which follow a fixed sequence of steps, agents work iteratively through a decision-making process.
    • They use the LLM's ability to generate text and understand prompts to:
      • Break down complex questions into smaller, actionable steps.
      • Choose the right tool for each step based on their understanding of the information and previous results.
      • Generate appropriate inputs for the chosen tool.
      • Interpret the output from the tool to decide if they have the answer or need to repeat the process.
    • Usage:
      • Handle multi-hop question answering:
        They can combine information from multiple sources and steps to answer complex questions that require reasoning and analysis.
      • Flexibility and adaptability:
        You can create custom tools and configure agents to fit specific needs and domains.

๐Ÿ“ข Haystack Retriever vs Reader

Feature Retriever Reader
Function Find relevant documents Extract answer from documents
Input User query Retrieved documents
Output List of documents Answer to the question
Methods Keyword matching, embeddings, semantic search Rule-based, machine learning, LLM-based
Focus Efficiency and speed Accuracy and precision
Complexity Relatively simpler More computationally expensive
Examples Elasticsearch Retriever, Embedding Retriever FARM Reader, Transformers Reader

Summary:

  • Retrievers act like librarians, scanning through a vast collection of books to find relevant ones based on your request.
  • Readers serve as expert analysts, carefully examining those books to pinpoint the specific information you need.

haystack-ragenerator-chatbot's People

Contributors

mohamedabdallah1996 avatar

Stargazers

mirkamol avatar Brett Butterfield avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.