rosetta-aisp-llm
LLM-powered fallback for AISP conversion using Claude SDK.
Extends rosetta-aisp with AI-powered conversion when deterministic Rosetta mappings have low confidence.
Features
- Hybrid Conversion: Combines deterministic Rosetta mappings with LLM fallback
- Confidence-Based Triggering: Only uses LLM when confidence is below threshold
- Multiple Model Support: Choose between haiku, sonnet, or opus based on complexity
- Async API: Built with async/await for efficient I/O
Installation
[]
= "0.2"
Usage
use ;
async
Custom LLM Provider
Implement the LlmProvider trait to add support for other LLM providers:
use ;
use async_trait;
use Result;
;
CLI Tool
This crate includes the rosetta CLI for command-line conversions.
Installation
Or build from source:
# Binary will be at target/release/rosetta
Commands
# Convert prose to AISP notation
# Convert with LLM fallback enabled
# Force a specific tier (minimal, standard, full)
# Output as JSON
# Convert AISP back to prose
# Detect appropriate conversion tier
# Look up a symbol for prose pattern
# Look up prose for a symbol
# List all symbols (optionally by category)
# List all categories
# Test round-trip semantic preservation
Piping Input
All commands that accept -i/--input can also read from stdin:
|
|
LLM Fallback Options
# Enable LLM fallback with custom threshold
# Use different Claude models (haiku, sonnet, opus)
Requirements
- Rust 1.85+
- Claude Code CLI (for
ClaudeFallbackprovider and--llm-fallbackflag)
License
MIT