Query document

⬅ Go back to Agent Home Page

 This tool is currently in Alpha and has been released for early access and feedback
It may include incomplete features, limited functionality, or be subject to change. Alpha tools are intended for evaluation and validation  purposes only and should only be be used in non-production environments.

The Query document tool allows a ReadiAI Agent to read and analyze the contents of a document stored in the ReadiNow Document Library. This tool is ideal for enabling agents to reference supporting documents such as policies, procedures, or knowledge articles and respond to user queries with document-based information.

Adding a tool to an Agent

To add the Start Workflow tool to a ReadiAI Agent:

  1. Open the Agent Builder.
  2. From the left-hand menu, navigate to the Tools section.
  3. Click Add Tool.
  4. Select and click Start Workflow from the list of available tool types. The Configure Start Workflow Tool dialog will appear.

Configuring the tool

Follow these steps to configure the document query tool:

  1. Select Document
    • Choose a document from the ReadiNow Document Library.
    • This is the file the agent will analyse and query when responding to user questions.
  2. Enter an Alias
    • Provide a short, meaningful Alias for the document.
    • This alias can be referenced in the agent's instructions to identify this document more clearly.
    • Example:
      Use HR Policy instead of the full file name.
  3. Enter a Content Description
    • Write a brief Content Description that outlines what the document contains.
    • This helps the agent determine when the document is relevant to a user's query.
    • Example: 
    • This document outlines the organisation’s leave policies, including annual, sick, and parental leave entitlements.
  4. Click Save to finish configuring the tool
    • Once configured, the agent will be able to intelligently query the contents of the selected document and return relevant information based on the user’s request.

Considerations

  • Craft specific queries 
    Avoid vague prompts. The agent performs best with targeted questions (e.g. “What is the maximum number of parental leave days?” instead of “Tell me about leave”).
  • Context-free reasoning
    The tool is designed to fetch factual excerpts—not to summarise or interpret full documents. Don’t use it for decisions that require multi-step logic or dynamic calculations.
  • Document size limits
    Very large files may exceed LLM processing limits. Consider splitting long documents into smaller, topic-focused files when needed.
  • No memory across steps
    The agent retrieves content in response to the current prompt only. It does not retain awareness of previous document lookups.

Example: Referencing a Leave Policy

Here’s a full example of how to configure and use the Query Document tool with structured agent instructions:

##Role
You are an expert in HR leave policies.

## Goal
I need your help to answer questions about employee leave entitlements using our official policy.

## Input

### Knowledge
-**HR Policy**

### Context
- User input: Leave-related questions (e.g. “How many sick days can I take?”)

## Decision Criteria
- Use the **HR Policy** document to extract policy text relevant to the user's question.
- Only respond if a matching clause is found.
- If no content is found, say: "This policy doesn't appear to cover that."


## Steps
**Agent:**
1. Receive a user question about leave.
2. Search the **HR Policy**.
3. Return an answer with the relevant excerpt.
4. Respond clearly and cite the policy alias.

**End User:**
1. Ask a question about leave (e.g. “What is our sick leave policy?”)
2. Read the agent’s response.

Related articles: