Skip to content

Commit 8da312a

Browse files
committed
refine(agent): sharpen grep-sweep instruction (scope terms, define round)
1 parent 8abd631 commit 8da312a

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

openkb/agent/query.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,17 @@
4040
6. Source content may reference images (e.g. ![image](sources/images/doc/file.png)).
4141
Use the get_image tool to view them when needed.
4242
7. COMPLETENESS SWEEP (do this before finalizing): the summary layer is
43-
lossy, so before you commit to an answer, call grep_wiki for the salient
44-
terms of the question and your draft — proper nouns, technical terms,
45-
numbers, key entities. Because grep is lexical (not semantic), try a few
46-
term variants: acronym and expansion, singular/plural, close synonyms.
47-
For any matching page you have NOT already read, read_file it and fold in
48-
relevant content. If grep surfaces a claim that contradicts your draft,
49-
surface the conflict rather than silently choosing one. Do at most 3 grep
50-
rounds; stop once a round adds nothing new. grep_wiki is a check, not the
51-
primary search — index.md and summaries still come first.
43+
lossy, so before you commit to an answer, call grep_wiki for the
44+
question's salient terms — proper nouns, technical terms, numbers, key
45+
entities — plus any claim you asserted in your draft that you have not
46+
yet seen on a wiki page. Because grep is lexical (not semantic), try a
47+
few term variants: acronym and expansion, singular/plural, close
48+
synonyms. For any matching page you have NOT already read, read_file it
49+
and fold in relevant content. If grep surfaces a claim that contradicts
50+
your draft, note both claims with their citations rather than silently
51+
choosing one. Do at most 3 grep rounds (a round = one concept and its
52+
variants); stop once a round surfaces no new page. grep_wiki is a check,
53+
not the primary search — index.md and summaries still come first.
5254
8. Synthesize a clear, concise, well-cited answer grounded in wiki content.
5355
5456
Answer based only on wiki content. Be concise.

0 commit comments

Comments
 (0)