Afonso Ribeiro
Afonso Ribeiro
When im querying say a pdf document, the results shown to me are based solely on 1 chunk from that document. The one with the highest semantic proximity to the...
### Describe the bug The LLM is filling the "Message to recruiter" field with an answer to a previously applied job at another company. ### Steps to reproduce _No response_...
`_get_model_input_state` in `create_react_agent` builds its "missing messages" error string with an f-string containing `{state}` on every model call, even when nothing is raised. That calls `repr()` on the whole message...
`sort_context` in the graph context builder for community reports (`summarize_communities/graph_context/sort_context.py`) adds edges one at a time and, after each edge, rebuilds the entity, claim and relationship DataFrames, renders them with...
LocalProvider finds a component by name by walking every registered component, and `_check_version_mixing` does the same walk on every `add_*`. Registering N components is therefore quadratic, and every `tools/call`, `prompts/get`...
repair_json gets much slower than linear on some long inputs that LLMs produce: long strings, arrays of strings with unescaped inner quotes, answers with many `]` or `}` inside strings...
With Observational Memory enabled, `ObservationStep.prepare()` runs before every agent step and counts the tokens of every unobserved message twice, plus checks drained messages for unread parts. In a tool-calling run...
`ChatCompletionStreamState._accumulate_chunk` (`src/openai/lib/streaming/chat/_completions.py`) calls `from_json(bytes(..., "utf-8"), partial_mode=True)` on the full accumulated `message.content` (with a `response_format` model) and on the full accumulated arguments of strict function tools, on every delta. Streaming one...
`.remove()` calls `removeElement` once per node, and each call does an `indexOf` plus a `splice` on the parent's `children`, so removing many siblings from one container is quadratic. `update()` and...
Streaming spends a lot of its time in the event loop rather than in pydantic-ai code. Every streamed event goes through `AgentStream._anext_lock`, `AgentStream._model_pull_lock` and the `_source_lock` of each `PeekableAsyncStream` in...