Contents

Cancel

Recommended Articles

  1. unify-apps

    Indexing

    Unify AI

    Transform raw content into searchable knowledge through AI-powered indexing and vector embeddings

  2. unify-apps

    IMAP

    Unify Integrations

    Integrate your app with IMAP to enable seamless email synchronization, real-time access, and enhanced communication workflows.

  3. unify-apps

    Preview Your Work

    Unify Automations

    Effortlessly review & monitor your automation’s performance

  4. unify-apps

    FTP/FTPS

    Unify Integrations

    Connect your app with FTP/FTPS to automate secure file transfers and streamline data exchange across systems.

  5. unify-apps

    Snowflake

    Unify Automations

    Connect to Snowflake for fast, scalable cloud data warehousing and analytics

  6. unify-apps

    Button

    Unify Applications

    Create interactive elements with ease using buttons

  7. unify-apps

    BambooHR

    Unify Automations

    Integrate your app with BambooHR to streamline HR management, automate employee data processing, and enhance onboarding workflows

  8. unify-apps

    Build your first automation

    Unify Automations

    Learn how to build your automation step by step

  9. unify-apps

    User Management

    Unify Applications

    Efficiently manage user roles and permissions

  10. unify-apps

    Microsoft Teams

    Unify Automations

    Connect your app with Microsoft Teams to enhance communication, automate workflows, and foster collaboration across your organization

  11. unify-apps

    Jira

    Unify Automations

    Use Jira to plan, track, and manage your agile and software development projects

  12. unify-apps

    Pre Processing

    Unify AI

    Optimize query processing through intelligent rephrasing, retrieval, and ranking to deliver accurate AI responses

  13. unify-apps

    Google Calendar

    Unify Integrations

    Integrate your app with Google Calendar to streamline scheduling, automate event management, and improve team coordination

  14. unify-apps

    SAP HANA

    Unify Integrations

    Connect your app with SAP HANA to leverage in-memory computing for real-time data processing and advanced analytics at scale.

#
Unify AI
Logo
Pre Processing

Pre Processing

Logo

6 mins READ

Overview

The complete knowledge management process for an AI agent consists of 3 layers:

AI Agent Response Generation Workflow :

  1. Knowledge Indexing

    • Document processing

    • Embedding generation

    • Vector storage

  2. Query Processing & Retrieval - Query Rephrasing

    • Chunk Retrieval

    • Ranking/Reordering

  3. Response Generation

    • Answer formation

    • Response delivery

The query processing and retrieval system represents the middle layer of the knowledge management process, positioned between knowledge indexing and final response generation

At the pre-processing stage, we define different parameters that manage how user queries are processed to retrieve and rank relevant information from the vector store from the pool of added knowledge sources.

Stages of Pre-Processing

  1. Query Rephrasing The query rephrasing serves as the first line of optimization in the pre-processing pipeline. This component employs LLMs to transform user queries into more precise and relatable formats depending on the conversation context. You can define how you want user queries to be rephrased by customizing the rephraser prompt available in the "Prompts" section, and you can choose the query rephraser model from available options like Claude 3.5 Sonnet, GPT-4, and more.

    How It Works:

    • Analyzes the original user query

    • Applies contextual understanding to maintain intent

    • Reformulates the query for optimal information matching

      Let’s understand this better with the help of an example.

      Original Query: "What's our WFH policy?"
      Rephrased Query: "What are the current company policies and guidelines regarding working from home?"

  2. Chunk Retrieval  The chunk retrieval is responsible for extracting relevant information segments from the agent's knowledge base based on vector similarity search. This process fetches relevant chunks from the vector store where the knowledge sources are indexed. You can define the number of chunks to be retrieved.

    Let’s understand this better with the help of an example.

    For a WFH policy query, the system retrieves:

    • Complete remote work policy documentation

    • Management approval protocols

    • Time tracking and accountability guidelines

    • Related HR procedures

  3. Ranking Chunks The ranking system prioritizes and organizes retrieved information based on relevance scores and contextual importance along with the flexibility to chose a model of your choice.

    Lets understand this better with the help of an example.

    For a password reset query:

    Content Type

    Relevance Score

    Priority

    Password Reset Procedure

    0.95

    High

    Account Security Guidelines

    0.82

    Medium

    Password Requirements

    0.78

    Medium

    General Account Information

    0.45

    Low


To configure the Pre-processing step in your AI Agents, follow these steps:

  1. Choose a “Rephrasing Model” to reformulate user queries for improved accuracy. This helps in optimizing how queries are understood and processed.

    Image
    Image

  2. Next, specify how many chunks to retrieve for one query. The default value is set to 50, but you can adjust this based on the complexity and size of the data you're working with.

    Image
    Image

    Increasing the number may enhance retrieval but may also impact performance.

  3. Then, Select a “Ranking Model” for the retrieved chunks by reassessing their relevance and authority. This step ensures that the most relevant chunks are prioritized in the search results.

    Image
    Image

These settings optimize user queries by improving query reformulation, chunk retrieval, and ranking, ensuring high-quality query processing in AI agents.

The final step in configuring the AI agent is Response Generation.