|
Entropic 2.3.8
Local-first agentic inference engine
|
Auto-generated classification prompt for the router model. More...


Go to the source code of this file.
Classes | |
| struct | entropic::prompts::TierDescriptor |
| Lightweight tier descriptor for classification prompt building. More... | |
Namespaces | |
| namespace | entropic |
| Activate model on GPU (WARM → ACTIVE). | |
Functions | |
| ENTROPIC_EXPORT std::vector< std::string > | entropic::prompts::interleave_examples (const std::vector< TierDescriptor > &tiers) |
| Round-robin interleave few-shot examples across tiers. | |
| ENTROPIC_EXPORT std::string | entropic::prompts::build_classification_prompt (const std::vector< TierDescriptor > &tiers, const std::string &message, const std::vector< std::string > &history={}, const std::vector< std::string > &recent_tiers={}) |
| Auto-generate classification prompt from tier focus + examples. | |
Auto-generated classification prompt for the router model.
Ports Python's build_classification_prompt() and _interleave_examples().
Definition in file classification.h.
| std::string entropic::prompts::build_classification_prompt | ( | const std::vector< TierDescriptor > & | tiers, |
| const std::string & | message, | ||
| const std::vector< std::string > & | history = {}, |
||
| const std::vector< std::string > & | recent_tiers = {} |
||
| ) |
Auto-generate classification prompt from tier focus + examples.
The trailing " -> " (with space) constrains the router model to output a single digit. Used with max_tokens=1 for classification.
| tiers | Ordered tiers (index+1 = classification digit). |
| message | User message to classify. |
| history | Recent user messages for context (optional). |
| recent_tiers | Recent tier activations for continuity (optional). |
| tiers | Ordered tiers (index+1 = classification digit). |
| message | User message to classify. |
| history | Recent user messages for context. |
| recent_tiers | Recent tier activations for continuity. |
Definition at line 125 of file classification.cpp.
| std::vector< std::string > entropic::prompts::interleave_examples | ( | const std::vector< TierDescriptor > & | tiers | ) |
Round-robin interleave few-shot examples across tiers.
Cycling through tiers prevents recency bias — no single tier's examples dominate the tail of the prompt. The 0.6B router model is sensitive to example ordering.
| tiers | Ordered tiers (index+1 = classification digit). |
| tiers | Ordered tiers (index+1 = classification digit). |
Definition at line 41 of file classification.cpp.