Building Multi-Agent Systems with MCP and Pydantic AI for Document Processing

deepsense · Tech · 2025 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.5 (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 document-processing and MCP integration

DeepSense AI worked for a customer with a document-processing platform and needed to build both an MCP server for that platform and a multi-agent demonstration system that could structure data on demand from large, heterogeneous document sources. The deeper production problem was not only connecting agents to tools, but designing tool schemas, token budgets, model choices, observability, evaluation, validation, and security so the resulting agentic document workflow remained modular, affordable, debuggable, and safe.

Constraints:

Architecture

DeepSense used Pydantic AI as the agent framework, Claude models as the main model family, MCP for external tool integration, and Databricks MCP plus a custom MCP server for the customer's document-processing platform. A user provides a document-processing objective, the system asks clarifying questions, generates a structured table schema, uses Databricks MCP to create the table, invokes the custom platform MCP to process documents from scratch or reuse an existing workflow, writes extracted rows into a Databricks Delta table, and then lets a downstream agent summarize or query the table with SQL. The implementation relies on strongly typed Pydantic models, Pydantic AI tool decorators, dependency injection, optional graph workflows, MCP toolsets, Logfire traces, Pydantic evals, LLM-as-judge evaluation, and guardrail validation with model retry.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  user-objective["User objective"] --> task-definition-agent["Task definition agent"]
  task-definition-agent --> schema-generation-agent["Schema generation agent"]
  schema-generation-agent --> databricks-mcp-server["Databricks MCP server"]
  databricks-mcp-server --> databricks-delta-table["Databricks Delta table"]
  custom-platform-mcp-server["Custom platform MCP server"] --> document-processing-platform["Document processing platform"]
  document-processing-platform --> databricks-delta-table
  databricks-delta-table --> chat-and-sql-agent["Chat and SQL agent"]
  pydantic-ai-framework["Pydantic AI framework"] --> task-definition-agent
  pydantic-ai-framework --> schema-generation-agent
  pydantic-ai-framework --> chat-and-sql-agent
  pydantic-ai-framework --> pydantic-ai-mcp-toolset["Pydantic AI MCP toolset"]
  pydantic-ai-mcp-toolset --> databricks-mcp-server
  pydantic-ai-mcp-toolset --> custom-platform-mcp-server
  claude-model-provider["Claude model provider"] --> pydantic-ai-framework
  fastmcp-implementation["FastMCP implementation"] --> custom-platform-mcp-server
  pydantic-ai-framework --> logfire-observability["Logfire observability"]
  pydantic-ai-framework --> pydantic-evals["Pydantic evals"]
  pydantic-evals --> guardrail-validation["Guardrail validation"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
User objective Natural-language goal for processing a set of documents and extracting structured information. Task definition agent
Task definition agent Agent that understands intent, asks clarifying questions, and defines the extraction task. User objective, Schema generation agent
Schema generation agent Agent that produces an AI-generated typed table schema from the conversation. Task definition agent, Databricks MCP server
Databricks MCP server Existing MCP integration used to create Databricks tables for extracted structured data. Schema generation agent, Databricks Delta table, Pydantic AI MCP toolset
Custom platform MCP server Custom MCP server exposing the customer's internal document-processing platform capabilities. Document processing platform, Pydantic AI MCP toolset
Document processing platform Customer platform that processes many file types and data sources into LLM-readable formats. Custom platform MCP server, Databricks Delta table
Databricks Delta table Structured table containing extracted document rows and supporting SQL queries. Databricks MCP server, Document processing platform, Chat and SQL agent
Chat and SQL agent Final agent that summarizes findings, shows sources, or runs SQL over the extracted table. Databricks Delta table, Pydantic AI MCP toolset
Pydantic AI framework Agent framework providing model selection, structured output, tools, dependency injection, streaming, delegation, graphs, evals, and observability integrations. Task definition agent, Schema generation agent, Chat and SQL agent, Pydantic AI MCP toolset, Logfire observability, Pydantic evals
Pydantic AI MCP toolset MCP client/toolset integration connecting Pydantic AI agents to MCP servers. Pydantic AI framework, Databricks MCP server, Custom platform MCP server
Claude model provider Main LLM family selected for the project after experimenting with multiple providers and models. Pydantic AI framework
FastMCP implementation Python library used to expose MCP tools with decorators, typed functions, JSON schemas, and JSON-RPC metadata. Custom platform MCP server
Logfire observability Tracing and debugging tool showing nested spans, model calls, prompts, tools, tokens, pricing, and bottlenecks. Pydantic AI framework, Pydantic evals
Pydantic evals Evaluation framework for cases, scoring, and LLM-as-judge assessment of agent outputs. Pydantic AI framework, Logfire observability, Guardrail validation
Guardrail validation Runtime validation that checks outputs against database state or other facts and sends model-retry feedback when validation fails. Pydantic AI framework, Pydantic evals

Data flow

The user states a goal for a set of files, such as analyzing PDFs in an S3 bucket. An intent/task-definition agent asks clarifying questions and generates a schema with typed fields. After user acceptance or feedback, Databricks MCP creates a target table. The custom MCP server for the document-processing platform starts a new workflow or reuses an existing one, processes the files into LLM-readable format, and stores extracted structured rows. A final agent can summarize findings, show source-backed entries, or run SQL queries against the Databricks table and compose an answer. Observability and evaluation wrap the flow through Logfire traces, token/pricing visibility, test cases, evaluators, and validation guardrails.

6 supporting quotes
“the user specifies a goal they he wants to achieve uh for the files uh he has uh and the agentic system after few steps”transcript, stated
“positioning of uranium production companies. Um so first we are understanding the intent of user and then we are defining the task. So this agent will actually ask some clarifying question uh questions to understand the topic. uh more and uh after you know few iterations of this conversation”transcript, stated
“know few iterations of this conversation it will actually generate this schema for us. So this schema is fully AI generated uh based on this conversation. So we got multiple type uh multiple fields extracted uh in multiple different uh types like strings, integers, floats,”transcript, stated
“the MCP uh data bricks will be used to actually create this table uh in in datab bricks. Then uh we got the part where we actually implemented our MCP for this data processing platform. Um so you know the user could process their documents from scratch uh”transcript, stated
“the user could process their documents from scratch uh with using new workflow new document processing workflow or maybe reuse the existing one”transcript, stated
“he can actually execute SQL query um and you know query the the the table and based on the answer uh he can write an response”transcript, stated

Why this architecture

The architecture combines Pydantic AI and MCP because Pydantic AI provides typed structured output, tools, dependency injection, delegation, graph workflows, evals, and observability, while MCP standardizes integrations across tools, languages, and agent implementations. The team used MCP to avoid rewriting the same API integration for each agent, Databricks MCP for table creation, and a custom MCP server for the customer's platform. The lesson set pushes the design toward narrow tool exposure, curated tool payloads, cheaper/faster models for simple work, Logfire tracing, explicit evals, guardrails, and security hardening.

5 supporting quotes
“pyantic AI is actually model agnostic. So we can uh select any provider we want from those popular or less popular ones”transcript, stated
“those from from cloud models in November 2024 and it standardizes how AI agents communicate with external tools and data sources. What I mean by that is we are creating one MCP server uh to basically expose all the tools available for Google calendar. Um and the same for Chromob and maybe”transcript, stated
“foundation. I will show you this JSON file in a second. Uh but yeah, you can imagine that one of those servers can be reused by many for example 15 agents. Uh and what is another beautiful part is that MCP is right now you know quite fashionable I would say quite quite popular.”transcript, stated
“the agent will be able to use this MCP uh as it is. So yeah, this is exactly where MCP meets by AI and this is kind of our setup in in this process. All right. Uh we worked for a customer who had a solution for uh processing documents uh into LM readable”transcript, stated
“Remember about observability and evaluation. Again, Pyantic AI has great solutions for that. Um then we don't know yet if MCP will become a standard in in industry but there is a big potential for it to become this USBC for AI integration. So I recommend”transcript, stated

Models used: Claude 3.5 · Claude 4.5 · Claude Haiku · Gemini 2.0 Flash · Pydantic AI · FastMCP · Databricks MCP

Scale

Alternatives considered (roads not taken)

Create separate native tools for every agent and external API.

Rejected because: MCP centralizes each external API or platform behind one reusable server, reducing duplicated integrations and schema-change maintenance.

3 supporting quotes
“agents with this platform. Uh well you can imagine that we need to create a distinct tool for uh each AI agent for Google Google calendar and if we will have multiple AI agents uh in our system then we would need to create a separate tool uh based on the same API uh twice because you know we need”transcript, stated
“if we will have multiple AI agents uh in our system then we would need to create a separate tool uh based on the same API uh twice”transcript, stated
“we are creating one MCP server uh to basically expose all the tools available for Google calendar. Um and the same for Chromob and maybe this data processing platform. So we got one place um and which is again just a set of tools. uh this is language”transcript, stated

Expose loosely typed dict-style tool signatures and minimal docstrings.

Rejected because: The LLM mainly sees function signatures and docstrings, so poor typing and vague documentation waste tokens and invite hallucinations or errors.

3 supporting quotes
“the only stuff that LLM will see is actually uh the function signature and the dock string. So we need to remember to type those input parameters and return type uh very specifically. Uh for example, this is a bad example where we don't have we don't have it”transcript, stated
“we don't have we don't have it typed. We have some dict right then the dock string is a bit uh well not not uh enough”transcript, stated
“it's super dangerous to put tools like that because it will just you know waste your token it will be super expensive it will invite some hallucinations”transcript, stated

Return full uncurated JSON payloads from tools.

Rejected because: Full payloads can exceed context limits, raise cost, and make it harder for the LLM to extract the needed information; the speaker recommends selecting only needed fields or compressing when appropriate.

3 supporting quotes
“when you put everything in there you can you know u maybe not match the context limit or it will be super expensive”transcript, stated
“the LLM will not be able to extract the correct information so instead remember to uh to curate your JSON. Well, uh just select the fields that you actually need and maybe uh at some point you will also uh you could also compress the JSON into one string. Uh”transcript, stated
“you could also compress the JSON into one string. Uh it it may be controversial. It will not always work. Um but for some use cases it can be good. Then avoid over and under specifying tools. Um so this is actually our use case. Um you remember that we”transcript, stated

Expose every tool to every agent.

Rejected because: Filtering tools per agent is easier, more secure, and improves multi-agent behavior by avoiding tool overload.

3 supporting quotes
“remember to filter and limit tools per agent. We don't want all tools to be exposed to all agents because it's not very secure.”transcript, stated
“your agent will be just you know uh filled with tools and it will not know what which one to use. So in case of this chat document agent which was basically answering the question uh we had a tool for getting document insights and executing SQL query and”transcript, stated
“we had a tool for getting document insights and executing SQL query and that's it. Uh the other tools were assigned to other agents.”transcript, stated

Use the most capable Claude model for every interaction.

Rejected because: The speaker recommends splitting responsibilities: stronger models for creative or complex tasks, and cheaper/faster models such as Claude Haiku or Gemini Flash for routine chat when latency or price matters.

3 supporting quotes
“this one will be more for creative tasks, complex tasks. And for example clot haiku which is much faster. Uh of course it's not that good u but it's much cheaper, it's much uh quicker. Uh so we can use it for day-to-day conversations with with this convers”transcript, stated
“more for creative tasks, complex tasks. And for example clot haiku which is much faster. Uh of course it's not that good u but it's much cheaper, it's much uh quicker. Uh so we can use it for day-to-day conversations with with this convers conversational agent. Uh if it's not quick enough”transcript, stated
“then just use Gemini 2.0 flash, it's extremely quick or some other models that you u prefer then u you know the observability isn't really optional. Um so with good observability debugging tool you can do miracles and debug your application with ease. Um”transcript, stated

Implement every workflow as a graph.

Rejected because: Graphs can be overkill for mostly linear flows; a linear flow can be easier to read and lower complexity when the process does not need complex looping.

3 supporting quotes
“graph approach. So I introduced you to graph approach in um pyantic AI but sometimes uh it may be an overkill.”transcript, stated
“our flow uh in I mean our demo was more or less linear. We had some comebacks uh but like in the in its basics it was quite linear.”transcript, stated
“I would uh encourage you to basically use linear flow. Um this is the same with less code, uh less complexity, it's it's linear, so it's easier to read. Um yeah, so watch out about those uh graphs um when you build your system. Uh lesson 10, uh well security”transcript, stated

Patterns

multi-agent-orchestration (agent-architecture)

The document-processing demo uses multiple agents for intent clarification, schema generation, platform workflow execution, SQL/query answering, and final summarization rather than a single monolithic agent.

3 supporting quotes
“our uh one of our customers wanted us to build a multi- aent system.”transcript, stated
“the user specifies a goal they he wants to achieve uh for the files uh he has uh and the agentic system after few steps”transcript, stated
“this agent will actually ask some clarifying question uh questions to understand the topic.”transcript, stated

tool-use-orchestration (tooling)

The system exposes platform and Databricks capabilities through MCP servers and Pydantic AI toolsets so agents can create tables, process documents, execute SQL, and call external APIs.

3 supporting quotes
“we reused uh existing MCP which was datab bricks MCP and we even created our own one”transcript, stated
“pyantic AI got us covered so they got you know the implementation for MCP we can just uh put the endpoint here and put the tool set”transcript, stated
“the implementation for MCP we can just uh put the endpoint here and put the tool set and that's basically it so the agent will be able to use this MCP uh as it is. So yeah, this is exactly where MCP meets by AI and this is kind of our setup in in this process. All right. Uh we worked for a”transcript, stated

structured-output-contract (extraction)

Pydantic models define typed agent outputs, and the document-processing workflow generates typed schemas with strings, integers, floats, dates, and other fields for extracted tables.

3 supporting quotes
“if you're interested about some structured output from your uh agent then well pyantic AI was obviously created by pyantic people.”transcript, stated
“Uh that's where pyantic models are super useful to basically put output type and then uh the agent response actually will be uh structured that way.”transcript, stated
“we got multiple type uh multiple fields extracted uh in multiple different uh types like strings, integers, floats, dates whatever”transcript, stated

context-compaction (token-management)

The team curates and sometimes compresses tool responses, and unified over-specified data-source tools to cut tool-list token usage by 50%.

3 supporting quotes
“remember to uh to curate your JSON. Well, uh just select the fields that you actually need”transcript, stated
“you could also compress the JSON into one string. Uh it it may be controversial. It will not always work.”transcript, stated
“with that way we got 50% off of tokens. It's less expensive and uh it will uh fit the context”transcript, stated

model-routing (model-selection)

The guidance routes complex/creative tasks to stronger Claude models and routine conversational work to faster or cheaper models such as Claude Haiku or Gemini Flash.

3 supporting quotes
“select proper model for proper use case. Uh we used clothes 3.5 uh as our main model.”transcript, stated
“this one will be more for creative tasks, complex tasks. And for example clot haiku which is much faster.”transcript, stated
“then just use Gemini 2.0 flash, it's extremely quick or some other models that you u prefer”transcript, stated

observability-tracing (operations)

Pydantic Logfire captures nested traces, bottlenecks, token counts, prices, prompts, tool calls, model output, HTTP/MCP/SQL spans, and other debugging information.

3 supporting quotes
“the observability isn't really optional. Um so with good observability debugging tool you can do miracles and debug your application with ease.”transcript, stated
“we can see input output tokens uh we can see the pricing when we hover over it”transcript, stated
“Uh also you know normal open AI or OpenAI agents uh P traffic to maybe some HTTP requests uh MCP some SQL uh libraries. So everything will be stuck here. We just need to add one line which is lofire.”transcript, stated

eval-driven-development (quality)

The project uses Pydantic evals with named cases, inputs, expected outputs, metadata, and evaluators so prompt changes and agent changes can be tested before production.

3 supporting quotes
“remember about testing your agents. This is also super crucial because maybe some prompt change will actually affect your uh your performance.”transcript, stated
“We got the input for our agent. We got expected output and we got some metadata for for filtering or sorting.”transcript, stated
“then we are creating the evaluator. So we want to know how to score our uh cases.”transcript, stated

llm-as-judge (evaluation)

The speaker describes Pydantic evals using an LLM judge to assess whether structured insights are grounded, directly related, and comprehensive.

3 supporting quotes
“There are plenty of evaluators implemented in pyantic evals. For example, LM as a judge uh right there.”transcript, stated
“we are basically providing this LLM uh the way the instruction on how we want to uh evaluate this particular task”transcript, stated
“we are evaluating if our structured insights are grounded in the document directly related or comprehensive”transcript, stated

safety-policy-enforcement (security)

The talk emphasizes guardrail validation, not trusting agents blindly, filtering tools, and securing MCP integrations against prompt-injection/data-leak risks.

3 supporting quotes
“this data set and we'll got the similar table as before u but created by uh this llm as a judge approach then don't trust your agent we got some robust guard rails so of course we got this structured output We we remember that the agent can actually uh return some some output which is”transcript, stated
“remember to filter and limit tools per agent. We don't want all tools to be exposed to all agents because it's not very secure.”transcript, stated
“some malicious issue was created in public GitHub repo. Uh and it actually tricked the AI agent”transcript, stated

Tradeoffs

Use MCP to expose platform and data tools.

Chose Reusable MCP servers connected through Pydantic AI over Duplicated native tools per agent and per API.

Rationale: MCP reduces duplicate integrations and creates a common language-agnostic JSON-RPC interface, but poorly designed MCP tools can bloat context and damage reasoning.

3 supporting quotes
“it standardizes how AI agents communicate with external tools and data sources”transcript, stated
“Uh but yeah, you can imagine that one of those servers can be reused by many for example 15 agents. Uh and what is another beautiful part is that MCP is right now you know quite fashionable I would say quite quite popular.”transcript, stated
“if it's designed purely, then it will basically bloat context windows. It will be super expensive.”transcript, stated

Unify data-source-specific workflow tools.

Chose One parameterized tool with a literal data-source selector and unified configuration over Separate tools for S3, Google Drive, Azure Blob, and other data-source workflows.

Rationale: Unification cut tool-list tokens by 50% and fit the target context window, but it relies on the agent choosing the right literal/configuration.

3 supporting quotes
“we could uh process the data in S3 in Google Drive in Azure blob and you know we had many of those”transcript, stated
“Um so what we actually did was uh to unify those tools and it worked great for us. Uh as I mentioned for for example Pyantic AI knows exactly how to call this tool.”transcript, stated
“Pyantic AI knows exactly how to call this tool. um he can select this string from literal.”transcript, stated

Route tasks to models by complexity and latency/cost needs.

Chose Claude for strong reasoning and cheaper/faster models for routine conversation over Using the most capable Claude model for every step.

Rationale: Claude 4.5 offers strong reasoning but has higher pricing and latency, while Haiku or Gemini Flash can handle day-to-day interactions faster and cheaper.

3 supporting quotes
“This is great reasoning. Uh it's you know it's achieving great results on uh all the benchmarks.”transcript, stated
“but then the pricing is not very welcoming and also the latency it's like 1.8 8 seconds time to first token”transcript, stated
“clot haiku which is much faster. Uh of course it's not that good u but it's much cheaper”transcript, stated

Use a linear flow when graph orchestration is unnecessary.

Chose Readable sequential code for mostly linear demo flows over Pydantic AI graph workflows for every agent process.

Rationale: Graphs support cycles and conditional routing, but they added code complexity when the demo was largely linear.

3 supporting quotes
“We had some comebacks uh but like in the in its basics it was quite linear.”transcript, stated
“we implemented it using graph approach uh but the code is not as good in reading as just normal linear flow”transcript, stated
“this is the same with less code, uh less complexity, it's it's linear, so it's easier to read.”transcript, stated

Validate structured outputs against side effects.

Chose Guardrail checks plus model retry feedback over Trusting the structured response once it matches the Pydantic output schema.

Rationale: Structured output can still describe a database write that did not happen, so the system checks persisted state and asks the model to retry with feedback.

3 supporting quotes
“Uh but maybe we want some more validation. Um for example, let's say that the tool was actually uh saving some uh some some insights in the database and we would like to uh see if this LLM didn't hallucinate and didn't return some error while uh doing so.”transcript, stated
“if this insights is actually uh inside the database before we will uh return this insight to our system”transcript, stated
“if not then we are raising model retry and this model retry with some feedback will actually go back to our agent”transcript, stated

Gotchas (what bit them)

Tool definitions written for humans can fail when exposed to LLMs.

Root cause: The LLM primarily sees the function signature and docstring, not the source code a programmer could inspect.

Resolution: Use explicit input/return types and descriptive but concise docstrings that explain how and when the tool should be used.

3 supporting quotes
“the only stuff that LLM will see is actually uh the function signature and the dock string”transcript, stated
“as programmers we can be a bit annoyed yet it can be forgivable as we can just go to source code and analyze what's going on”transcript, stated
“we want the agent to understand what's going on in this tool and how can uh how can we use it exactly”transcript, stated

Over-specified tool sets can exceed model context before the task starts.

Root cause: Listing many data-source-specific tools inflated the tool schema to 16K tokens, beyond the target 10K context window.

Resolution: Unify related tools and use literal parameters/configuration where the model can reliably choose among supported options.

3 supporting quotes
“it took uh 16 uh K tokens to actually list those tools and it was a problematic”transcript, stated
“which had only 10K uh context at maximum. So this was the limit.”transcript, stated
“Um so what we actually did was uh to unify those tools and it worked great for us. Uh as I mentioned for for example Pyantic AI knows exactly how to call this tool.”transcript, stated

Tool responses can drown the model in irrelevant JSON.

Root cause: Returning everything from an API may exceed context, raise cost, and make the relevant fields harder for the model to isolate.

Resolution: Curate response fields and compress payloads only when the use case supports it.

3 supporting quotes
“when you put everything in there you can you know u maybe not match the context limit or it will be super expensive”transcript, stated
“the LLM will not be able to extract the correct information so instead remember to uh to curate your JSON.”transcript, stated
“Well, uh just select the fields that you actually need and maybe uh at some point you will also uh you could also compress the JSON into one string.”transcript, stated

All-tools-to-all-agents makes systems less secure and less reliable.

Root cause: An overloaded agent may see tools it should not use and become confused about tool choice.

Resolution: Filter and limit tools per agent and per MCP toolset subset.

3 supporting quotes
“We don't want all tools to be exposed to all agents because it's not very secure.”transcript, stated
“your agent will be just you know uh filled with tools and it will not know what which one to use”transcript, stated
“we are selecting the tools that we want to use for this particular um agent.”transcript, stated

Graph workflows can add unnecessary complexity.

Root cause: Mostly linear flows with only minor returns become harder to read when modeled as graph classes and node methods.

Resolution: Prefer a linear flow when the process is fundamentally sequential and does not require complex graph behavior.

3 supporting quotes
“So I introduced you to graph approach in um pyantic AI but sometimes uh it may be an overkill. So uh our flow uh in I mean our demo was more or less linear.”transcript, stated
“our demo was more or less linear. We had some comebacks uh but like in the in its basics it was quite linear.”transcript, stated
“use linear flow. Um this is the same with less code, uh less complexity, it's it's linear, so it's easier to read.”transcript, stated

MCP can expand the blast radius of prompt-injection attacks.

Root cause: Tooling standards make it easy for agents to act across systems, so malicious tool-visible content can cause data leakage if permissions and validation are weak.

Resolution: Treat MCP security as a first-class design topic, limit tool exposure, validate outputs, and avoid trusting agent actions blindly.

3 supporting quotes
“security is super important. Uh GitHub users knows that already.”transcript, stated
“some malicious issue was created in public GitHub repo. Uh and it actually tricked the AI agent”transcript, stated
“injecting some private repo data into public PR. So we had some information leaked”transcript, stated

Passing schema validation is not enough; the agent can still hallucinate database effects.

Root cause: Structured outputs only constrain shape, not whether the output reflects actual persisted state.

Resolution: Use guardrail validation that checks database state and raises model retry with feedback if the claim is false.

3 supporting quotes
“structured output We we remember that the agent can actually uh return some some output which is returned in a structured way.”transcript, stated
“maybe we want to uh check out if this insights is actually uh inside the database before we will uh return this insight”transcript, stated
“this model retry with some feedback will actually go back to our agent and our agent will try again”transcript, stated

Evaluation

The talk recommends an explicit evaluation layer using Pydantic evals, named test cases, expected outputs, metadata, custom evaluators, and LLM-as-judge evaluators. It also treats Logfire observability as part of the feedback loop because traces expose prompts, model calls, tools, tokens, prices, and bottlenecks.

Metrics: Expected-output match score in Pydantic evals · LLM-as-judge grounding, relatedness, and comprehensiveness ratings · Input and output token counts · Pricing visible in traces · Latency/time schema and bottleneck traces · Model retry outcomes after guardrail failures

4 supporting quotes
“remember about testing your agents. This is also super crucial because maybe some prompt change will actually affect your uh your performance.”transcript, stated
“expected output is exactly the same as as output then we are at then we are setting score to one.”transcript, stated
“we are evaluating if our structured insights are grounded in the document directly related or comprehensive”transcript, stated
“we can see input output tokens uh we can see the pricing when we hover over it”transcript, stated

Outcomes

The source is a technical lessons-learned talk rather than a production KPI report. It quantifies platform breadth as many file types and hundreds of sources, a 16K-to-10K context problem, a 50% token reduction from unifying tools, and model latency around 1.88 seconds time to first token for the cited Claude model.

5 supporting quotes
“So our customer had data processing platform and we wanted to connect uh our agents with this platform.”transcript, stated
“the MCP uh data bricks will be used to actually create this table uh in in datab bricks”transcript, stated
“At the end we can ask some questions about this data and of course this last agent can answer based on this summary”transcript, stated
“with that way we got 50% off of tokens. It's less expensive and uh it will uh fit the context”transcript, stated
“I hope you will be able to easily apply those those lessons learned to your system so we learned them the hard way.”transcript, stated