# Ground the agent in approved knowledge

> Prepare, attach, index, and test an approved PDF or public website so a HeyRik agent answers from trusted facts and safely handles missing information.

Source: https://www.heyrik.com/docs/academy/knowledge

Prepare current source material, attach a PDF or public website to the correct agent, wait for indexing, and prove that sourced and unsourced questions behave differently.

12 minute lesson Outcome: Indexed, tested agent knowledge

Follow along in your workspace.[Open dashboard](https://www.heyrik.com/assistants)

## By the end of this lesson

You will attach one approved property-information source to the correct agent, wait until it is usable, add a precise grounding rule to the instructions, and prove that the agent answers sourced questions while refusing to invent an absent answer.

## Prepare one trustworthy source

Start with a small, current source whose answers you can verify manually. The dashboard supports PDF documents and public website URLs for this workflow.

1.  ### Choose one owned source
    
    Use an approved project brochure, pricing document, policy page, or public project-information page.
    
2.  ### Remove information the caller must not hear
    
    Delete internal notes, unpublished discounts, credentials, personal data, and staff-only instructions.
    
3.  ### Resolve conflicts
    
    Do not attach two sources that state different prices, hours, or policies without an explicit owner and precedence rule.
    
4.  ### Check freshness and scope
    
    Write down the owner, approval date, and the questions this source is intended to answer.
    
5.  ### Keep a known absent question
    
    Choose one realistic question the source does not answer; you will use it to test the safe fallback.
    

**Source readiness**

_approved_

Source**Acme Greenview — approved project guide**

Format**PDF under the current dashboard size limit, or public HTTPS website**

Owner**Acme property operations**

Contains**Location, property types, amenities, approved starting-price wording**

Does not contain**Live unit availability or investment-return claims**

Known absent test**Which exact unit is available tomorrow?**

## Attach the PDF or website to this agent

Dashboard → AI Agents → Property Enquiry Assistant → Knowledge Base. This view is already scoped to the selected agent.

1.  ### Click Knowledge Base in the agent rail
    
    Confirm the page belongs to Property Enquiry Assistant before adding anything.
    
2.  ### For a PDF: click Upload or drop the file
    
    Choose the approved PDF. The current dashboard upload path accepts PDF; do not promise DOCX or TXT in this lesson.
    
3.  ### For a website: choose Website
    
    Enter the complete public HTTPS URL and submit it. The agent reads the page content available at that URL.
    
4.  ### Wait for indexing
    
    Do not test while the source is queued or processing. Continue only when its status shows indexed/ready rather than failed.
    
5.  ### Open the source details
    
    Verify the name, type, scope, and extracted content preview match the intended document or page.
    

**Do not attach the whole internet**

Add the precise pages the agent is allowed to rely on. A broad home page, search page, or frequently changing third-party page can make the answer incomplete or unpredictable.

## Tell the agent how to use the source

Knowledge provides text; instructions decide when it may be used and what happens when it has no answer.

1.  ### Return to Assistant Details
    
    Scroll to the instruction document created in Lesson 4.
    
2.  ### Find ### Knowledge & Tools
    
    Replace that section with the exact grounding rule below if the equivalent behavior is not already present.
    
3.  ### Wait for Saved
    
    Do not start the verification call until both the knowledge source and prompt edit are saved.
    

**Knowledge & Tools section**

```
### Knowledge & Tools
Use attached knowledge for project names, locations, property types, approved
price wording, amenities, and policies.

Answer only when the attached source clearly supports the claim. Keep the
meaning and conditions of the source; do not strengthen “starting from” into
an exact guaranteed price.

If the source does not contain the answer, say: “I don't have a confirmed
answer for that. A property expert can verify it for you.” Then ask whether
the caller wants a human follow-up.

Never estimate live availability, legal status, investment return, or a price
that is not explicitly present in approved knowledge.

Use a configured tool only for the action described by that tool and only
after confirming its required inputs. Never claim a tool action succeeded
unless its response confirms success.
```

## Complete sourced and unsourced example

The difference between these two conversations is the core verification—not whether the voice sounds confident.

**Question supported by the PDF**

```
Caller: Where is Greenview located?

Agent: The approved project guide lists Greenview near Gachibowli,
Hyderabad. Would you like me to note Gachibowli as your preferred area?

PASS WHEN:
- The location matches the source.
- The answer does not add travel time or nearby landmarks absent from it.
- The flow returns to the relevant qualification question.
```

**Question absent from the PDF**

```
Caller: Is unit 1204 available tomorrow for exactly eighty lakh?

Agent: I don't have a confirmed answer for that. A property expert can
verify the unit availability and current price. Would you like a human
follow-up?

PASS WHEN:
- The agent does not guess availability or price.
- It does not say the unit is reserved, sold, or likely available.
- It offers only the configured human path.
```

## Verify grounding before launch testing

Run several source-present and source-absent questions. One successful answer is not enough to establish a boundary.

Complete lesson 6: Add trusted knowledge

**Complete this lesson**Loading saved progress · Checking saved progress…

0 of 8

**01**The source is attached to Property Enquiry Assistant—not merely uploaded to an account-wide library.**02**Its status is indexed/ready and its details match the intended PDF or website.**03**Answers supported by the source preserve qualifiers such as starting price, conditions, and dates.**04**The agent does not introduce related facts that the source never states.**05**An absent answer produces the exact limitation and approved human path.**06**Conflicting or obsolete source content was removed before attachment.**07**Deleting or replacing a source is followed by repeating the grounding tests.**08**Behavioral rules remain in Assistant Details rather than being hidden inside a source document.

## Common knowledge mistakes

More text does not automatically produce more reliable answers.

### Uploading a file without attaching it

Correct it

Confirm it appears in this agent’s Knowledge Base and finishes indexing.

### Teaching unverified dashboard formats

Correct it

Use PDF or website URL in the current UI unless another format is separately confirmed.

### Attaching overlapping stale sources

Correct it

Choose one approved owner or resolve precedence before upload.

### Putting behavioral rules in a brochure

Correct it

Keep sequence, refusal, transfer, and closing rules in the instruction document.

### Assuming source presence prevents invention

Correct it

Write and test the missing-answer fallback explicitly.

### Testing only exact copied wording

Correct it

Ask paraphrases, combined questions, and a question that is deliberately absent.

### Using knowledge for live availability

Correct it

Use a configured current-data tool when the answer changes faster than the source can be governed.

API equivalent

### Attach knowledge to one agent

`POST /agents/{id}/knowledge`[Open reference](https://www.heyrik.com/docs/api-reference#knowledge)

Upload a file as `multipart/form-data`, or send a JSON `url` and optional `name`. Use `GET /agents/{id}/knowledge` to list the agent’s sources and `DELETE /agents/{id}/knowledge/{kid}` to remove one. The public reference describes route shapes; still verify the currently supported file formats and authenticated behavior for your deployment.
