UnieAI Studio

Attach a KB and verify document question answering

Check indexing, independent search, attachment, tool engine, and Playground before tuning retrieval.

RAG finds evidence in authorized KBs before the agent answers. Four things must work: searchable documents, attached KBs, a tool-capable engine, and a Tool Calling answering model.

1. Verify the KB independently

  1. Open Agent Builder → Knowledge bases → target KB.
  2. Check that at least one document is indexed, not merely uploaded.
  3. Click Search at the upper right and ask a question explicitly answered in the document.
  4. Expand results and verify text, filename, and available page metadata.
  5. If empty, try exact document terms and inspect indexing and search settings.

Checkpoint: the correct source passage is found independently. If not, return to the KB walkthrough. Editing agent instructions cannot repair a missing index.

Enter text or a regular expression on the KB search page, then run the search.
Enter text or a regular expression on the KB search page, then run the search. Click to enlarge

2. Attach the KB in Setup

  1. Open Agent Builder → My Agents → target agent → Setup.
  2. Scroll to Assets → Knowledge bases.
  3. Select the KB and wait for saving.
  4. Reopen Setup and confirm the selection remains. If the KB is missing, check project or personal account and access.

Asset selection saves immediately. The advanced editor is available from the Setup Behavior card's More settings → Data and semantics, then Data sources → Knowledge bases. Confirm its save status or use Save changes where displayed.

Checkpoint: the correct KB is attached, rather than an empty or similarly named dataset.

 Verify the tutorial KB is checked in Assets; these changes save immediately.
Verify the tutorial KB is checked in Assets; these changes save immediately. Click to enlarge

3. Check engine and model capability

  1. Inspect Execution engine in Setup.
  2. Start document questions with UnieAI Harness Lite. Consider UnieAI Harness for planning when enabled by the platform.
  3. For Default, inspect the currently resolved engine.
  4. Do not test KB use with Plain model, which calls no KB or other tools.
  5. Confirm the answering model supports Tool Calling and is available in the current project or personal account.

Checkpoint: engine, model capability, and actual asset attachment are all correct; none substitutes for the others.

 Choose UnieAI Harness Lite so the agent can call connected KBs and tools.
Choose UnieAI Harness Lite so the agent can call connected KBs and tools. Click to enlarge

4. Save evidence and missing-information instructions

  1. Open Setup → Definition → System instructions.
  2. Merge these rules with the existing role.
  3. Click Save at the bottom and confirm success.
Search the attached knowledge base before answering product questions.
Use retrieved evidence and cite the filename and available page number.
If the document does not answer the question, explain the information gap instead of guessing.

Verify citations in real output. Instructions neither create permissions nor attach a KB.

Edit the system instructions under Definition on the agent setup page, then save and reopen to verify.
Edit the system instructions under Definition on the agent setup page, then save and reopen to verify. Click to enlarge

5. Test three cases in a new conversation

  1. Click Try in Playground.
  2. Select the agent model ID, not the base model.
  3. Start a new conversation to avoid previous test answers influencing results.
  4. Test and compare evidence with the sample document.
TestSample questionAcceptance
FactORBIT-42 support hours and timezone?Correct time, timezone, and source
ProcedureHow do I handle ERR-102?Synchronization check, waiting, and failure reporting in order
Missing informationWhat is the product price?No invented price

Inspect available tool events for actual KB search. Only investigate instructions and answer generation after independent retrieval works.

Select the tutorial agent in Playground, ask a question and check its document sources.
Select the tutorial agent in Playground, ask a question and check its document sources. Click to enlarge

6. Tune retrieval and tool rounds when needed

Establish a baseline with the defaults. Open Setup → Behavior → Agent loop settings and expand Advanced adjustments. Available settings depend on the selected engine and current UI.

SettingTradeoffCompare
Retrieval countNumber of references returned by ordinary searchCheck sources and read more original text when evidence is insufficient
Iteration/step limitAdditional rounds may help complex tasks and increase latency and usageWhether the extra tool rounds help complete the task

Retrieval count is not a document, page or source-row count, and differs from Playground's model-sampling top_k. Counts, sums and rankings require the complete worksheet, not the number of search hits.

KB Super matches parsed text without a vector-similarity threshold. Some compatibility interfaces retain min_score, but changing it does not filter KB Super matching lines. For missing results, check the text, document scope, parsing status and active version.

Change one setting at a time, save it and compare with the same questions.

7. Verify document updates

  1. Upload a new file when content changes. Reparse processes the platform's stored original, not your edited local file.
  2. Wait for the new index, then search the changed paragraph.
  3. Verify filename/version in the result.
  4. Open a new agent conversation and check the updated answer.

A same-name document series prioritizes its latest successfully indexed version. Differently named files may still duplicate content. See document management.

Diagnose by layer

Failing layerFirst checks
Upload/parseRequired models, project or personal account permissions, balance, format, stage error
KB searchCompleted parsing, exact terms, document scope and version
Search works; agent does not searchAttachment, Plain model, Tool Calling, selected agent
Evidence found; answer wrongInstructions, model capability, conversation history, conflicting versions
Playground works; API does notRuntime URL, key scope, allowed models, agent model ID

Continue with agent setup, Playground, and acceptance checks.

Network access settings

On the agent Setup page, use Network access settings in the Behavior card to configure web search (web_search) and page fetching (web_fetch) separately. Answers from a connected knowledge base do not require external web access.

Behavior entries on the agent setup page.

Configure web search and page fetching separately.

Agent loop settings

Use Setup → Behavior → Agent loop settings to adjust the engine and tool behavior. Expand Advanced adjustments for additional settings. Retrieval counts here serve a different purpose from the Playground model sampling parameter top_k.