Single Turn Solver
Interacts once with the model by sending it input messages and collects one response. Use this for question-answering, summarisation, and any task where no back-and-forth conversation / interactions are needed.
Examples
Example: Harry Potter Trivia. Sends a system prompt and a user question to the model and collects a single response. The dataset has a question column.
Single Turn Solver
# ...
definition:
# ...
solver:
type: "single_turn_solver"
input_builder:
type: "chat_completion"
input_messages:
- role: "system"
content: "You are a helpful assistant."
- role: "user"
content: "Respond to this question concisely. {{ sample.question }}"For a sample {"question": "Who is the headmaster of Hogwarts?"}, the model produces a single assistant message, leading to the following solver output:
| Turn | Role | Content |
|---|---|---|
| 1 | system | You are a helpful assistant. |
| 2 | user | Respond to this question concisely. Who is the headmaster of Hogwarts? |
| 3 | assistant | Albus Dumbledore |
Configuration
Properties
type Literal “single_turn_solver” required
Type
message_format enum TraceFormat
Default: open_responses
The message format used by the solver for recording its output.
When set to open_responses (default), the solver converts input and output messages into Open Responses trace items and produces a SolverTrace wrapping a structured Trace object.
When set to latticeflow, the solver produces a SingleSolverOutput with LFMessage objects. This format is deprecated and will be removed in a future version.
Allowed Values:
latticeflowopen_responses
input_builder GeneralInputBuilder, ChatCompletionInputBuilder required
Input Builder
postprocessor TaskSolverPostprocessor
Default: None