Documentation Index
Fetch the complete documentation index at: https://docs.axioniclabs.ai/llms.txt
Use this file to discover all available pages before exploring further.
steering.generate_vectors()
Computes a steering vector from positive (and optionally negative) example pairs. Returns a vector ID that can be passed to generation.generate().
Seed text that precedes each answer (e.g.,
["I tell the...", "My statement is..."]).Completions that demonstrate the desired behavior (e.g.,
[" truth", " factual"]).Completions to contrast against for CAA (e.g.,
[" lie", " false"]). Required for method="caa". Ignored for method="few-shot".Layer indices to capture activations from. Defaults to a model-appropriate selection if omitted.
Vector computation method:
"few-shot", "caa" (Contrastive Activation Addition), or "steering-perceptrons" (remote-only; not supported for local execution).A display name for the vector (used in the Spectra UI and API responses).
A label/category for organizing the vector.
- CAA
- Few-Shot
Contrastive Activation Addition computes the directional difference between positive and negative activations. The most precise method when you have both types of examples.
steering.generate_pairs()
Generates contrastive example pairs automatically using an LLM, given a persona description. Useful for bootstrapping a dataset before computing vectors.
Short name for the persona (e.g., “Empathetic Support Agent”).
Description of the desired behavioral traits.
Number of contrastive pairs to generate.
Pairs generated per batch.
persona, total_pairs, pairs, and avg_final_score.
steering.evaluate()
Evaluates a steering vector’s effectiveness using cosine similarity metrics and LLM-as-judge scoring.
The vector ID to evaluate.
Texts representing the desired behavior.
Texts representing the undesired behavior.
Prompts to generate steered completions for judge evaluation.
Steering strength during evaluation.
cosine_metrics and judge_evaluation.
Utilities
Load examples from a JSONL file, or persist vectors to disk for reuse:generation.generate() as the steering_vector parameter.