Let it look things up rather than putting it in search mode
Results announced themselves as the source, so a question it already knew got answered by paraphrasing the first hit.
This commit is contained in:
@@ -274,8 +274,18 @@ function vv_ai_web_search(string $question): array {
|
||||
// renumbering the other.
|
||||
function vv_ai_web_context(array $results, int $offset = 0): string {
|
||||
if (!$results) return '';
|
||||
$s = "Web search results. These are from outside this installation — cite them by number, and\n"
|
||||
. "say when something is a general answer rather than one about this machine.\n\n";
|
||||
// Framed as reference material, not as the answer. The search runs whenever the box is
|
||||
// ticked, because a search is one HTTP request and deciding to run it would cost a whole
|
||||
// extra generation — but running it must not mean leaning on it. Answering a question the
|
||||
// model already knows by paraphrasing the first search result is worse than answering it
|
||||
// directly, and it was doing that because the results announced themselves as the source.
|
||||
$s = "Reference material from a web search, in case it is useful. It is from outside this\n"
|
||||
. "installation and nothing here has been verified against this machine.\n\n"
|
||||
. "Answer from what you already know when you know it. Reach for these when you do not,\n"
|
||||
. "when the question turns on something current, or when a specific version, release or\n"
|
||||
. "figure needs checking rather than recalling. Cite by number only what you actually\n"
|
||||
. "used, ignore the rest, and never imply the web was consulted about this installation —\n"
|
||||
. "it was not. Say plainly when an answer is general rather than about this machine.\n\n";
|
||||
foreach ($results as $i => $r) {
|
||||
$s .= '[' . ($offset + $i + 1) . '] ' . $r['title'] . ' — ' . $r['url'] . "\n"
|
||||
. $r['snippet'] . "\n\n";
|
||||
|
||||
Reference in New Issue
Block a user