ReduceDocumentsChain
. It is useful in the same situations as ReduceDocumentsChain
, but does an initial LLM call before trying to reduce the documents. RefineDocumentsChain This chain collapses documents by generating an initial answer based on the first document and then looping over the remaining documents to refine its answer. This operates sequentially, so it cannot be parallelized. It is useful in similar situations as MapReduceDocuments Chain, but for cases where you want to build up an answer by refining the previous answer (rather than parallelizing calls). MapRerankDocumentsChain This calls on LLM on each document, asking it to not only answer but also produce a score of how confident it is. The answer with the highest confidence is then returned. This is useful when you have a lot of documents, but only want to answer based on a single document, rather than trying to combine answers (like Refine and Reduce methods do). ConstitutionalChain This chain answers, then attempts to refine its answer based on constitutional principles that are provided. Use this to enforce that a chain's answer follows some principles. LLMChain ElasticsearchDatabaseChain Elasticsearch Instance This chain converts a natural language question to an Elasticsearch
query, and then runs it, and then summarizes the response. This is useful for when you want to ask natural language questions of an Elasticsearch
database FlareChain This implements FLARE, an advanced retrieval technique. It is primarily meant as an exploratory advanced retrieval method. ArangoGraphQAChain Arango Graph This chain constructs an Arango query from natural language, executes that query against the graph, and then passes the results back to an LLM to respond. GraphCypherQAChain A graph that works with Cypher query language This chain constructs a Cypher query from natural language, executes that query against the graph, and then passes the results back to an LLM to respond. FalkorDBGraphQAChain Falkor Database This chain constructs a FalkorDB query from natural language, executes that query against the graph, and then passes the results back to an LLM to respond. HugeGraphQAChain HugeGraph This chain constructs an HugeGraph query from natural language, executes that query against the graph, and then passes the results back to an LLM to respond. KuzuQAChain Kuzu Graph This chain constructs a Kuzu Graph query from natural language, executes that query against the graph, and then passes the results back to an LLM to respond. NebulaGraphQAChain Nebula Graph This chain constructs a Nebula Graph query from natural language, executes that query against the graph, and then passes the results back to an LLM to respond. NeptuneOpenCypherQAChain Neptune Graph This chain constructs a Neptune Graph query from natural language, executes that query against the graph, and then passes the results back to an LLM to respond. GraphSparqlChain Graph that works with SparQL This chain constructs a SparQL query from natural language, executes that query against the graph, and then passes the results back to an LLM to respond. LLMMath This chain converts a user question to a math problem and then executes it (using numexpr) LLMCheckerChain This chain uses a second LLM call to verify its initial answer. Use this when you have an extra layer of validation on the initial LLM call. LLMSummarizationChecker This chain creates a summary using a sequence of LLM calls to make sure it is extra correct. Use this over the normal summarization chain when you are okay with multiple LLM calls (eg you care more about accuracy than speed/cost). create_citation_fuzzy_match_chain ✅ Uses OpenAI function calling to answer questions and cite its sources. create_extraction_chain ✅ Uses OpenAI Function calling to extract information from text. create_extraction_chain_pydantic ✅ Uses OpenAI function calling to extract information from text into a Pydantic model. Compared to create_extraction_chain
this has a tighter integration with Pydantic. get_openapi_chain ✅ OpenAPI Spec Uses OpenAI function calling to query an OpenAPI. create_qa_with_structure_chain ✅ Uses OpenAI function calling to do question answering over text and respond in a specific format. create_qa_with_sources_chain ✅ Uses OpenAI function calling to answer questions with citations. QAGenerationChain Creates both questions and answers from documents. Used to generate question/answer pairs for evaluation of retrieval projects. RetrievalQAWithSourcesChain Retriever Does question answering over retrieved documents, and cites it sources. Use this when you want the answer response to have sources in the text response. Use this over load_qa_with_sources_chain
when you want to use a retriever to fetch the relevant document as part of the chain (rather than pass them in). load_qa_with_sources_chain Retriever Does question answering over documents you pass in, and cites it sources. Use this when you want the answer response to have sources in the text response. Use this over RetrievalQAWithSources when you want to pass in the documents directly (rather than rely on a retriever to get them). RetrievalQA Retriever This chain first does a retrieval step to fetch relevant documents, then passes those documents into an LLM to generate a response. MultiPromptChain This chain routes input between multiple prompts. Use this when you have multiple potential prompts you could use to respond and want to route to just one. MultiRetrievalQAChain Retriever This chain routes input between multiple retrievers. Use this when you have multiple potential retrievers you could fetch relevant documents from and want to route to just one. EmbeddingRouterChain This chain uses embedding similarity to route incoming queries. LLMRouterChain This chain uses an LLM to route between potential options. load_summarize_chain LLMRequestsChain This chain constructs a URL from user input, gets data at that URL, and then summarizes the response. Compared to APIChain, this chain is not focused on a single API spec but is more general
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4