Ultimate Guide

How to build an AI Agent using Tars that answers questions from knowledge sources

Ish Jindal
Ish Jindal5 minutes read

Have you ever wondered how to create an AI agent that can answer questions from your company’s knowledge base? Whether your data lives in website content, PDF documentation, internal Notion docs, or SharePoint, building an intelligent assistant to access this information can transform how your team and customers find answers.

In this guide, I’ll walk you through creating an AI agent that can pull information from various knowledge sources to provide accurate, helpful responses. You’ll learn the entire process from start to finish, including a demonstration of a working agent and the backend configuration that powers it.

What You’ll Learn

  1. A demonstration of a fully functional AI agent built on internal documentation
  2. How to train a knowledge base using different loaders (websites, PDFs, CSVs)
  3. The concept of tools and using knowledge sources as tools
  4. Effective prompting strategies to enhance the user experience

Seeing the Agent in Action

Let’s start by looking at a complete AI agent I’ve already built. This particular assistant is trained on our company’s HR documentation and product knowledge. When team members (both new and existing) have questions about our HR processes, leave policies, insurance details, or even customer-related inquiries, they can simply ask this agent.

For example, when I ask, “How do I apply for leave?” the agent retrieves information from its knowledge base and provides a neatly formatted response. It explains the entire process, including details about emergency leave, approval processes, and application steps. The agent also cites where it found this information, ensuring transparency.

This type of AI agent has numerous applications:

  • Customer support automation
  • Website assistance for prospects and customers
  • Internal team support for IT service management
  • New employee onboarding
  • And many more scenarios where quick access to information is valuable

Check out our case studies to see how businesses are implementing these solutions.

Building the Agent: The Backend Process

Creating this agent is simpler than you might think. Here’s how to do it using our platform:

  1. Visit hellotars.com and sign up for an account
  2. Access our AI agent builder
  3. Create a new agent

The interface uses a canvas with blocks (which we call “gambits”) that represent each step in the conversation flow. Let me walk you through setting up the key components:

Step 1: Configure the AI Agent Gambit

The first gambit is where you establish what the agent will do:

  1. Create a detailed prompt that defines the agent’s role and purpose
    • Example: “You are an AI-powered team assistant for a company”
    • Specify that the agent is connected to multiple knowledge sources
  2. Select the AI model you want to use
  3. Configure any additional settings as needed

The initial prompt is crucial as it sets the parameters for how the agent will behave. We have a separate video dedicated to effective prompting techniques that you can check out for more details.

Step 2: Connect Knowledge Tools

For the agent to access information, it needs knowledge tools:

  1. Add an AI Tools gambit to your flow
  2. Select “Knowledge as a Tool” from the available options
  3. Connect your prepared knowledge bases

The beauty of using knowledge as a tool is that you can have different knowledge sources for different types of information. The agent will intelligently choose which knowledge source to reference based on the question it receives.

For example, in my agent:

  • One knowledge tool contains HR-related documentation (clearly titled “HR Process”)
  • Another contains product information
  • Each has a specific description that helps the agent determine which to use

When someone asks about leave policies, the agent knows to check the HR knowledge base rather than the product knowledge base. This separation prevents confusion and improves accuracy.

Step 3: Fine-tune the Agent’s Behavior

In the prompt, I’ve included specific instructions:

  • Always pull information from the most relevant knowledge source
  • Do not provide answers that aren’t in the knowledge base
  • Always use the knowledge tool to prevent hallucination

I’ve also defined the tone and interaction style to ensure a consistent user experience.

That’s it! With just an agent gambit connected to knowledge tools, you can create a functional AI assistant in minutes.

Creating and Training Knowledge Bases

Now, let’s look at how to prepare the knowledge that powers your agent.

From your dashboard, access the Knowledge Bases section. Here, you can see all your existing knowledge bases and create new ones.

To add a new knowledge base:

  1. Click “Add Knowledge Base”
  2. Select the source type:
    • Websites
    • PDF documents
    • CSV files
    • Zendesk
    • Slack
    • And more
  3. Add your content:
    • For websites: Enter URLs to be crawled
    • For PDFs: Upload your documents
  4. Click “Train” to process the information

For example, if I want to add our main website as a source, I simply enter the URL, give it a name like “Main Website,” and start the training process. The system will crawl the site and make the content available to the agent.

You can continuously update knowledge bases by adding more sources. For PDFs, just upload additional documents and retrain.

Conclusion

Building an AI agent that answers questions from your knowledge sources doesn’t have to be complicated. With the right tools, you can create a powerful assistant that:

  1. Provides accurate information from your documentation
  2. Knows which knowledge source to reference for different questions
  3. Maintains a consistent tone and follows your guidelines

Whether you’re supporting customers on your website, helping new employees navigate company policies, or streamlining internal information access, these AI agents can transform how people interact with your knowledge base.

Ready to create your own AI agent? Visit hellotars.com, sign up for an account, and start building. Existing users can log in and access these features immediately.

In just minutes, you can have an intelligent assistant that puts your organization’s knowledge to work.

Want to learn more? Follow us on LinkedIn and X for the latest updates, or explore our YouTube channel for more tutorials.

Like what you've read? Why not share it with a friend!
Ish Jindal
Ish Jindal

Ish is the co-founder at Tars. His day-to-day activities primarily involve making sure that the Tars tech team doesn’t burn the office to the ground. In the process, Ish has become the world champion at using a fire extinguisher and intends to participate in the World Fire Extinguisher championship next year.

banner-dotsbanner-dots

Learn why businesses trust us to automate their pre-sales and post-sales customer journeys.

Schedule Demo

Recommended Reading: Check Out Our Favorite Blog Posts!

Recommended Reading: Check Out Our Favorite Blog Posts!

See more Blog Posts

Our achievements in numbers

plant icon

7+

years in the Enterprise Conversational AI space

crown icon

700+

global brands that we’ve worked with

message icon

50m+

customer conversations automated

public

10+

countries with deployed Chatbots