Skip to content

Conversation

@dvyukov
Copy link
Collaborator

@dvyukov dvyukov commented Jan 15, 2026

Add LLMAgent.Candidates parameter.
If set to a value N>1, then the agent is invoked N times,
and all outputs become slices.

The results can be later aggregated by another agent,
as shown in the test.

@dvyukov dvyukov force-pushed the dvyukov-llm-candidates branch from 5a35bdd to 5bf687a Compare January 15, 2026 13:24
@dvyukov
Copy link
Collaborator Author

dvyukov commented Jan 15, 2026

cc @FlorentRevest @sirdarckcat don't know how useful this is for your experiments, but this allows to create workflows along the lines of:

&LLMAgent{
	Name:        "patch-generator",
	Reply:       "PatchDiffCandidate",
	Candidates:  5,
	Instruction: "Generate bug fix patch",
	Prompt:      "Crash: {{.Crash}}",
},
&LLMAgent{
	Name:        "aggregator",
	Reply:       "PatchDiff",
	Instruction: "Pick the best fix",
	Prompt: `
Crash:
{{.Crash}}

{{range $diff := .PatchDiffCandidate}}
Proposed fix:
{{$diff}
{{end}}
`,
},

@dvyukov dvyukov added the AI patching Feature requests and bugs related to AI-based kernel bug fix generation. label Jan 15, 2026
@sirdarckcat
Copy link
Member

Nice! I'll try to help adding tools during the hackathon

a-nogikh
a-nogikh previously approved these changes Jan 16, 2026
…agents

Add LLMAgent.Candidates parameter.
If set to a value N>1, then the agent is invoked N times,
and all outputs become slices.

The results can be later aggregated by another agent,
as shown in the test.
@dvyukov dvyukov added this pull request to the merge queue Jan 19, 2026
Merged via the queue into google:master with commit 1276f83 Jan 19, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI patching Feature requests and bugs related to AI-based kernel bug fix generation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants