Skip to content

Commit 1cc4064

Browse files
authored
add missing popovers to evals (#119)
1 parent 734b947 commit 1cc4064

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/testing-evals.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,11 @@ async def user_search(user_prompt: str) -> list[dict[str, str]]:
361361
return await conn.execute(result.data)
362362
```
363363

364+
1. The `SqlSystemPrompt` class is used to build the system prompt, it can be customised with a list of examples and a database type. We implement this as a separate class passed as a dep to the agent so we can override both the inputs and the logic during evals via dependency injection.
365+
2. The `build_prompt` method constructs the system prompt from the examples and the database type.
366+
3. Some people think that LLMs are more likely to generate good responses if examples are formatted as XML as it's to identify the end of a string, see [#93](https://github.com/pydantic/pydantic-ai/issues/93).
367+
4. In reality, you would have more logic here, making it impractical to run the agent independently of the wider application.
368+
364369
`examples.json` looks something like this:
365370

366371

0 commit comments

Comments
 (0)