Teaching AI Agents to Use Semantic Search Tools Effectively Through Knowledge Agent Training

mixedbread_ai · Tech · 2026 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Agentic retrieval and semantic search tool use

Mixedbread AI saw a retrieval bottleneck: LLM reasoning improved quickly, but agents still generated keyword-like search queries learned from web and code-search behavior, leaving semantic search tools underused in production knowledge tasks.

Constraints:

Architecture

Mixedbread built a custom search-agent harness with multiple semantic-search tools, corpus preview, query planning, deduplication, supervised fine-tuning from a teacher model, and on-policy reinforcement learning with retrieval and trajectory rewards.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  user_query["User query"] --> corpus_preview["Corpus preview"]
  corpus_preview --> search_agent["Search agent"]
  search_agent --> semantic_search_tools["Semantic search tools"]
  semantic_search_tools --> retrieved_chunks["Retrieved chunks"]
  retrieved_chunks --> reward_models["Reward models"]
  reward_models --> search_agent
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
User query Information need that the search agent must answer through semantic retrieval. Corpus preview, Search agent
Corpus preview Initial semantic-search results and metadata hints that orient the agent. User query, Search agent
Search agent Trained agent that decomposes search intent, selects tools, and ranks relevant chunks. Corpus preview, Semantic search tools, Reward models
Semantic search tools Overview and focused retrieval tools on the Mixedbread platform. Search agent, Retrieved chunks
Retrieved chunks Candidate evidence chunks deduplicated and ranked by the search agent. Semantic search tools, Reward models
Reward models Retrieval and trajectory judges that score NDCG, relevance, query quality, and exploration behavior. Search agent, Retrieved chunks

Data flow

The agent receives a user query, initial semantic search results, and metadata-facet hints. It decomposes the intent into up to four semantic queries, chooses tools, retrieves and deduplicates chunks, and returns a ranked list. Training starts with teacher-model SFT and then uses RL rewards for final retrieval quality and search trajectory behavior.

4 supporting quotes
“The agent initially receives the user query, results from an initial semantic search on that query, and hints about available metadata facets.”summary, stated
“The agent splits its search intent into a maximum of four queries covering separate aspects, selecting the best tool for each.”summary, stated
“Results are deduplicated before being returned to avoid redundant context consumption.”summary, stated
“First, supervised fine-tuning with a larger teacher LLM to establish baseline behavior. Second, on-policy reinforcement learning”summary, stated

Why this architecture

The architecture trains the agent to use semantic search as a tool, because prompting alone leaves agents stuck in keyword overlap behaviors that do not exploit semantic retrieval systems.

3 supporting quotes
“moving beyond keyword-based queries that agents typically generate due to their training on code search and web tools.”summary, stated
“This represents a fundamental mismatch between how agents are trained to query and how advanced retrieval systems are designed to work.”summary, stated
“The architecture is built entirely on the Mixedbread platform and consists of a carefully designed harness with four main search tools.”summary, stated

Models used: Teacher LLM · Search agent · Gemini 3.5 Flash · LLM reward judge

Scale

Alternatives considered (roads not taken)

Let general LLM agents generate search queries without training

Rejected because: They tend to use keyword patterns from web and code search rather than semantic query formulation.

“agents are trained to query and how advanced retrieval systems are designed to work.”summary, stated

Evaluate only final retrieved chunks

Rejected because: The training also needed trajectory rewards to shape how the agent searches.

“The trajectory reward uses an LLM judge to assess the search process itself, not just final results.”summary, stated

Patterns

tool-use-orchestration (agent tools)

The search agent learns when and how to invoke semantic search tools rather than issuing naive keyword queries.

“Their solution involved building a custom search agent trained specifically to use semantic search tools effectively, moving beyond keyword-based queries that agents typically generate due to their training on code search and web tools.”summary, stated

rag-retrieval (retrieval)

The system improves retrieval quality by training an agent to plan semantic search queries and rank chunks.

“The retrieval reward component uses standard retrieval metrics, specifically NDCG, calculated on the agent's final ranked list.”summary, stated

fine-tuning-adaptation (model adaptation)

The agent was trained with supervised fine-tuning followed by on-policy reinforcement learning.

“Through supervised fine-tuning with a teacher model followed by on-policy reinforcement learning with custom retrieval and trajectory rewards”summary, stated

Tradeoffs

Train a specialized search agent.

Chose SFT plus on-policy RL for semantic retrieval over Prompting a general-purpose LLM agent.

Rationale: The specialized agent directly optimized retrieval and trajectory metrics.

“custom search reward function designed specifically to optimize retrieval performance.”summary, stated

Provide a corpus preview before planning.

Chose Initial semantic search results and metadata hints over Blind query decomposition.

Rationale: The preview lets the agent understand corpus language and decide where to dig deeper.

“providing initial semantic search results helps the agent understand corpus language and identify where to dig deeper.”summary, stated

Gotchas (what bit them)

Agents trained on code and web tools may misuse semantic search.

Root cause: They default to keyword overlap rather than natural-language semantic queries.

Resolution: Train a search agent specifically on semantic-search tool use and reward query formulation.

“Rubrics evaluate whether queries are formulated as natural sentences rather than keyword strings, whether the amount of exploration is appropriate (neither too much nor too little), and overall efficiency.”summary, stated

Final-result metrics alone miss poor search behavior.

Root cause: An agent can arrive at some relevant chunks through inefficient or brittle exploration.

Resolution: Use trajectory rewards that judge the search process itself.

“The trajectory reward uses an LLM judge to assess the search process itself, not just final results.”summary, stated

Evaluation

Mixedbread evaluated both final retrieval rankings and agent search trajectories with NDCG, LLM relevance rubrics, and benchmark accuracy.

Metrics: NDCG@10. · OBELICS Congress benchmark. · Snowflake MatchQA accuracy. · Trajectory judge rubrics for natural query formulation and exploration.

“The retrieval reward component uses standard retrieval metrics, specifically NDCG, calculated on the agent's final ranked list.”summary, stated
“Rubrics evaluate whether queries are formulated as natural sentences rather than keyword strings, whether the amount of exploration is appropriate (neither too much nor too little), and overall efficiency.”summary, stated

Outcomes

The case reports benchmark results rather than production traffic volume; it focuses on retrieval quality in deep search tasks.

“achieved an NDCG@10 of 0.4 on the OBELICS Congress benchmark (significantly outperforming GPT-4's 0.18) and 93.4% accuracy”summary, stated