feat(agent): align the document tools with the harness-trained shape — ls, read(path), grep(pattern, path?)
This commit is contained in:
@@ -32,10 +32,11 @@ from tests.e2e.mock_llm import (
|
||||
SYSTEM_HIGH = "<relevance>HIGH</relevance>\n<documents>\n</documents>\n<tools>\n…\n</tools>"
|
||||
SYSTEM_LOW = "<relevance>LOW</relevance>\n"
|
||||
|
||||
#: A minimal truthy ``tools`` parameter (the mock only checks presence).
|
||||
TOOLS = [{"type": "function", "function": {"name": "list_documents"}}]
|
||||
#: A minimal truthy ``tools`` parameter (the mock only checks presence;
|
||||
#: the phase-70 harness-aligned names).
|
||||
TOOLS = [{"type": "function", "function": {"name": "ls"}}]
|
||||
|
||||
#: The agent's ``list_documents`` output for a two-document KB
|
||||
#: The agent's ``ls`` output for a two-document KB
|
||||
#: (``app/rag/agent.py`` ``_execute_tool``): one
|
||||
#: ``source: X | path: Y | title: Z`` line per document (phase 63: labeled,
|
||||
#: unambiguous fields), ``(source, path)`` order.
|
||||
@@ -103,7 +104,7 @@ def _body(
|
||||
{
|
||||
"id": f"call_{i}",
|
||||
"type": "function",
|
||||
"function": {"name": "list_documents", "arguments": "{}"},
|
||||
"function": {"name": "ls", "arguments": "{}"},
|
||||
}
|
||||
],
|
||||
}
|
||||
@@ -274,7 +275,8 @@ SEARCH_USER = (
|
||||
assert SEARCH_TRIGGER in SEARCH_USER.lower()
|
||||
assert TOOLS_TRIGGER not in SEARCH_USER.lower()
|
||||
|
||||
#: The agent's ``search_documents`` result for the e2e fixture
|
||||
#: The agent's ``grep`` result for the e2e fixture (phase 70 renamed
|
||||
#: the phase-68 tool; the line format is unchanged)
|
||||
#: (``app/rag/agent.py`` ``_execute_tool``): one ``source/path:LINE: text``
|
||||
#: match line (the sentinel line, 200-char-capped server-side).
|
||||
SEARCH_RESULT = (
|
||||
|
||||
Reference in New Issue
Block a user