
Query Expansion
Query Expansion in FlowHunt enhances chatbot understanding by finding synonyms, fixing spelling errors, and ensuring consistent, accurate responses for user que...
Task Decomposition breaks complex queries into smaller subqueries, helping AI chatbots deliver more accurate and focused answers.
Component description
Query Decomposition is a flow component designed to enhance the precision and effectiveness of AI-driven workflows by breaking down complex input queries into distinct, manageable sub-queries. This process helps ensure that each aspect of a user’s original question is addressed, leading to more thorough and accurate responses.
The primary function of the Query Decomposition component is to take an input text—typically a complex or multi-part question—and split it into several alternative or sub-queries. These sub-queries represent the individual pieces of information that need to be resolved in order to fully answer the original query. This approach is especially useful in scenarios where a question is broad, ambiguous, or composed of several intertwined elements.
Input Name | Type | Required | Description |
---|---|---|---|
Input Text | Message | Yes | The main text or question that you want to split into multiple alternative queries. |
Chat History | InMemoryChatMessageHistory | No | Previous chat messages to provide context for generating more precise sub-queries. |
LLM (Model) | BaseChatModel | No | The language model used for generating alternative queries. |
Include Original Query | Boolean | No | Option to include the original query in the list of alternative queries. |
System Message | String | No | Additional system-level instruction that can be appended to the prompt for customizing behavior. |
Query Decomposition is valuable in complex AI workflows where single queries may cover multiple topics or require multi-step reasoning. By breaking queries down, you can:
Feature | Description |
---|---|
Input | Complex user query (text) |
Output | List of alternative/sub-queries (as a message object) |
Context Support | Yes (via chat history) |
Model Selection | Yes (custom LLM can be specified) |
Advanced Options | Include original query, custom system message |
By integrating Query Decomposition into your AI workflow, you enable smarter, more granular handling of complex queries, leading to improved outcomes and a better user experience.
The Query Decomposition breaks complex and compound queries into simple subqueries that are easier to address. This way, it can provide more detailed and focused answers.
Query Decomposition isn’t necessary for all Flows. Its primary use is for creating customer service bots and other uses where the input requires a step-by-step approach to complex input. Using Task Decomposition ensures detailed and highly-relevant answers. Without it, the bot may resort to vague answers.
Both help the bot understand the query better. Query Decomposition takes complex or compound queries and breaks them down into smaller executable steps. On the other hand, Query Expansion appends incomplete or faulty queries, making them clear and complete.
Start building smarter AI chatbots and automate complex queries with FlowHunt’s Query Decomposition component.
Query Expansion in FlowHunt enhances chatbot understanding by finding synonyms, fixing spelling errors, and ensuring consistent, accurate responses for user que...
FlowHunt's Document to Text component transforms structured data from retrievers into readable markdown text, giving you precise control over how data is proces...
The Parse Data component transforms structured data into plain text using customizable templates. It enables flexible formatting and conversion of data inputs f...