mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-10-08 20:32:00 -04:00
agent: drop dated prompt patterns
- Synthesis prompt: drop the one-word/one-phrase answer clamp (a benchmark format applied to every budget-exhausted REPL turn) and the no-more-tools line the request already enforces; keep the report-don't-confabulate rule. - Driver guidance: drop the HN/Reddit source heuristic, which also reached every MCP client. - Save prompt: state the comment rule once instead of repeating it in the output-format line. - goto: describe when it returns, what it returns, and when a url-taking read is the better call.
This commit is contained in:
1 parent
7f4387b9c7
commit
ff6a54ba22
2 files changed
+10
-17
No files matched your search
+6
-10
@@ -118,16 +118,12 @@ fn savePrompt(revision: bool) []const u8 {
|
||||
|
||||
const synthesis_prompt =
|
||||
\\You have used your tool budget or cannot finish the exploration.
|
||||
\\Give your best final answer NOW based ONLY on what you actually observed
|
||||
\\via tool calls in this conversation. Do NOT fall back to prior knowledge —
|
||||
\\if your snapshots show only cookie banners, 403/access-denied pages,
|
||||
\\blocked search results, or empty bodies, say that explicitly
|
||||
\\(e.g. "the page was blocked by a cookie wall and I could not extract X").
|
||||
\\Do not invent details that are not visible in the tool outputs above.
|
||||
\\Do not call any more tools.
|
||||
\\Respond with ONLY the answer — one word, one number, one short phrase,
|
||||
\\or a brief honest explanation of why the page could not be read.
|
||||
\\No prefix, no markdown.
|
||||
\\Give your best final answer using only what the tool outputs above
|
||||
\\show, not prior knowledge. If they show only cookie banners,
|
||||
\\403/access-denied pages, blocked search results, or empty bodies, say
|
||||
\\so plainly (e.g. "the page was blocked by a cookie wall and I could not
|
||||
\\extract X") rather than filling the gap. Answer at the length the
|
||||
\\question needs.
|
||||
;
|
||||
|
||||
allocator: std.mem.Allocator,
|
||||
|
||||
@@ -106,9 +106,7 @@ pub const driver_guidance =
|
||||
\\- Triage from `search` snippets before opening links; open only the few
|
||||
\\ most promising. Don't re-run a search you already ran, and skip
|
||||
\\ near-duplicate sources that repeat the same announcement verbatim.
|
||||
\\- Stop once the gathered material answers the question. For opinion or
|
||||
\\ discussion questions, a couple of high-signal threads (e.g. Hacker
|
||||
\\ News, Reddit) usually beat scraping a dozen news sites.
|
||||
\\- Stop once the gathered material answers the question.
|
||||
\\
|
||||
\\Selector rules:
|
||||
\\- NEVER pass backendNodeId to click/fill/hover/selectOption/setChecked.
|
||||
@@ -179,9 +177,8 @@ pub const save_synthesis_prompt =
|
||||
\\list, fan out to detail pages, aggregate, return) stating what that block
|
||||
\\accomplishes toward the goal — NOT restating the API call. One comment per
|
||||
\\step, not per line; skip self-evident lines.
|
||||
\\Output ONLY JavaScript source — no markdown fences and no prose outside the
|
||||
\\code, but DO annotate the script with the `//` intent comments described
|
||||
\\above.
|
||||
\\Output the JavaScript source alone, with no markdown fences or prose
|
||||
\\around it.
|
||||
;
|
||||
|
||||
/// Script-language rules for consumers that never see the full
|
||||
@@ -345,7 +342,7 @@ pub const Tool = enum {
|
||||
pub fn definition(self: Tool) Definition {
|
||||
return switch (self) {
|
||||
.goto => .{
|
||||
.description = "Navigate to a specified URL and load the page in memory so it can be reused later for info extraction.",
|
||||
.description = "Navigate the current page to a URL. Returns a short status once `waitUntil` fires (default `load`), or a timeout notice; content rendered by post-load JavaScript may not be there yet (see `waitForState`). The page stays loaded for later reads and actions. To navigate and read in one call, pass `url` to `markdown`, `tree` or `html` instead; use `goto` when the next step is an action or `extract`.",
|
||||
.summary = "Open a URL and keep the page in memory",
|
||||
.input_schema = minify(
|
||||
\\{
|
||||
|
||||
Reference in new issue
Block a user