> ## Documentation Index
> Fetch the complete documentation index at: https://dialnexa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Knowledge In DialNexa Agents

> Use DialNexa knowledge bases in agents by attaching document context to agent versions, writing prompts that cite knowledge correctly, and testing answers.

Using knowledge in DialNexa agents gives the agent reference material beyond the prompt. Knowledge bases are selected on an editable agent version, and the prompt should tell the agent how to answer when knowledge is missing, outdated, or not relevant.

<Warning>
  Knowledge is not permission to guess. Tell the agent what to do when the answer is not in the material.
</Warning>

## Knowledge Agent Review

Use this checklist before publishing.

| Check                             | Why it matters                                                         |
| --------------------------------- | ---------------------------------------------------------------------- |
| Correct knowledge base attached   | The live agent version must use the intended content.                  |
| Documents are current             | Outdated content creates confident wrong answers.                      |
| Prompt has fallback rule          | The agent should know when to say it does not have the answer.         |
| Post-call fields fit the use case | Support or FAQ calls may need issue, resolution, or escalation fields. |
| Test questions are realistic      | Ask like callers, not like document authors.                           |

## Attach Knowledge Bases To A Draft Version

Knowledge settings are version-specific. Edit a draft version before changing the knowledge bases or retrieval settings that will be published.

<img src="https://mintcdn.com/dialnexa/HOnVBqIHk6o8-0eg/images/documentation/screenshots/agent-knowledge-base-settings.png?fit=max&auto=format&n=HOnVBqIHk6o8-0eg&q=85&s=8ac0ca358cc79fe2f1475dd4f7a885d3" alt="DialNexa agent Knowledge Base settings panel with an attached knowledge base, Chunks Retrieved slider, and Similarity Threshold slider." style={{ width: '100%', maxWidth: '1100px', margin: '8px 0 24px', border: '1px solid #e5e7eb', borderRadius: '6px' }} width="3420" height="1282" data-path="images/documentation/screenshots/agent-knowledge-base-settings.png" />

<Steps>
  <Step title="Open a draft agent version">
    Open the agent builder and make sure you are editing a draft, not viewing a published version.
  </Step>

  <Step title="Open Knowledge Base settings">
    In Agent Settings, open the **Knowledge Base** section.
  </Step>

  <Step title="Select knowledge bases">
    Click **Add Knowledge Base**, choose one or more workspace knowledge bases, or create a new knowledge base from the dropdown.
  </Step>

  <Step title="Tune retrieval">
    Set **Chunks Retrieved** from `1` to `10` and **Similarity Threshold** from `0` to `1`. Start with the defaults, then tune from real call questions.
  </Step>

  <Step title="Save, test, and publish">
    Test the draft with caller-style questions, then publish the version when answers are accurate.
  </Step>
</Steps>

Published versions lock knowledge controls. To change a live agent, edit the draft, attach or remove knowledge bases, test, and publish a new version.

## Test Knowledge Answers

<Steps>
  <Step title="Ask directly covered questions">
    Confirm the answer matches the document.
  </Step>

  <Step title="Ask adjacent questions">
    See whether the agent overextends beyond source material.
  </Step>

  <Step title="Ask missing-answer questions">
    Confirm the agent does not fabricate.
  </Step>

  <Step title="Review transcript and summary">
    Check whether the answer was understandable and accurate.
  </Step>

  <Step title="Update prompt or documents">
    Fix the layer that caused the issue.
  </Step>
</Steps>

## Knowledge Answer Problems

<AccordionGroup>
  <Accordion title="Agent ignores document">
    Prompt may not instruct when to consult knowledge.
  </Accordion>

  <Accordion title="Agent answers stale content">
    Update or delete outdated documents.
  </Accordion>

  <Accordion title="Agent makes up details">
    Add a no-answer rule and test missing information.
  </Accordion>

  <Accordion title="Wrong version tested">
    Confirm the published version has the intended knowledge attached.
  </Accordion>
</AccordionGroup>

## Related Reading

<CardGroup cols={2}>
  <Card title="Prompts" icon="message-square" href="/agents/prompts-and-welcome-messages">
    Tell the agent how to use knowledge.
  </Card>

  <Card title="Managing Documents" icon="files" href="/knowledge-base/managing-documents">
    Keep content current.
  </Card>

  <Card title="Testing Agents" icon="phone-call" href="/agents/testing-agents">
    Validate answers.
  </Card>
</CardGroup>
