Give a search agent several prompts and score a role by its best one
Migration 14 moves each non-empty agents.intent into agent_prompts as one prompt named after the agent, with its cached vector, and drops the three intent columns. A role's fit is the maximum over the agent's prompts of the calibrated cosine, and scores.prompt names the prompt that won. The agents API takes prompts and still takes intent; the role endpoint serves the agent's score and prompt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b6afe24eaa
commit
4e3c3f130e
9 files changed
+552
-127
No files matched your search
+5
-2
@@ -22,7 +22,7 @@ from typing import Any, Literal
|
||||
import yaml
|
||||
from pydantic import Field, ValidationError, field_validator, model_validator
|
||||
|
||||
from app.models import Gate, Limits, Weights
|
||||
from app.models import Gate, Limits, Prompts, Weights
|
||||
from auth import AuthConfig
|
||||
from desk.config import AgentConfig, ModelTaskConfig, Section, WorkersConfig
|
||||
|
||||
@@ -129,9 +129,12 @@ class EmbedConfig(Section):
|
||||
|
||||
class AgentSeed(Section):
|
||||
"""A search agent as `config.yaml` lists it. Imported into an empty
|
||||
`agents` table once; after that the table is the answer."""
|
||||
`agents` table once; after that the table is the answer. `prompts` is a
|
||||
list of `{name, text}`; without it, `intent` is the one prompt, named
|
||||
after the agent."""
|
||||
|
||||
name: str
|
||||
prompts: Prompts | None = None
|
||||
intent: str = ""
|
||||
gates: list[Gate] = Field(default_factory=list)
|
||||
weights: Weights = Field(default_factory=Weights)
|
||||
|
||||
Reference in new issue
Block a user