mirror of
https://github.com/VectifyAI/PageIndex.git
synced 2026-06-21 20:18:09 +02:00
fix(filesystem): clarify agent evidence recovery
This commit is contained in:
parent
c13cb203cd
commit
0243732e22
5 changed files with 26 additions and 7 deletions
|
|
@ -517,7 +517,7 @@ def test_cat_structure_page_node_and_text_outputs_are_hard_limited():
|
|||
"0006 0007 0008 0009 0010 0011"
|
||||
)
|
||||
|
||||
with pytest.raises(PIFSCommandError, match="cat accepts one file target"):
|
||||
with pytest.raises(PIFSCommandError, match="quote the whole target"):
|
||||
executor.execute("cat dsid_limited_pdf 0001")
|
||||
|
||||
text = json.loads(executor.execute("cat dsid_long_text --all"))
|
||||
|
|
|
|||
|
|
@ -204,6 +204,8 @@ class PIFSAgentStreamTest(unittest.TestCase):
|
|||
self.assertIn("prefer\ncat <path> --node <node_id>", BASH_TOOL_DESCRIPTION)
|
||||
self.assertIn("stop if the evidence is sufficient", AGENT_TOOL_POLICY)
|
||||
self.assertIn("continue with another chunk before answering", BASH_TOOL_DESCRIPTION)
|
||||
self.assertIn("Do not reconstruct paths from document titles", BASH_TOOL_DESCRIPTION)
|
||||
self.assertIn("file_ref/document_id", AGENT_TOOL_POLICY)
|
||||
|
||||
def test_prompt_requires_stat_for_metadata_questions(self):
|
||||
self.assertIn("stat --schema and stat <target>", AGENT_TOOL_POLICY)
|
||||
|
|
@ -218,6 +220,12 @@ class PIFSAgentStreamTest(unittest.TestCase):
|
|||
self.assertIn('use search-summary "<query>" <folder>', AGENT_TOOL_POLICY)
|
||||
self.assertIn('search-summary "Federal Reserve" /documents', BASH_TOOL_DESCRIPTION)
|
||||
self.assertIn("do not translate that request into find --where", AGENT_TOOL_POLICY)
|
||||
self.assertIn("verify the relevant facts with cat", AGENT_TOOL_POLICY)
|
||||
self.assertIn("verify the relevant claim with cat", BASH_TOOL_DESCRIPTION)
|
||||
|
||||
def test_prompt_rejects_find_grep_as_exhaustive_search(self):
|
||||
self.assertIn("Do not use find | grep as an exhaustive search", AGENT_TOOL_POLICY)
|
||||
self.assertIn("find output can be scoped or limited", AGENT_TOOL_POLICY)
|
||||
|
||||
def test_system_prompt_sets_workspace_identity_and_scope(self):
|
||||
self.assertIn("PageIndex FileSystem Demo Agent", AGENT_SYSTEM_PROMPT)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue