Sense: Go SDK for LLM-powered test assertions and structured text extraction

✍️ OpenClawRadar📅 Published: March 28, 2026🔗 Source
Sense: Go SDK for LLM-powered test assertions and structured text extraction
Ad

What Sense does

Sense is a Go SDK that leverages Claude for two primary use cases: evaluating non-deterministic output in tests and extracting structured data from unstructured text.

Key features

1. LLM-powered test assertions:

  • Write expectations in plain English instead of rigid assertions
  • Get structured feedback on failures including what passed, what failed, why, with evidence and confidence scores
  • Example usage: s.Assert(t, agentOutput).Expect("produces valid Go code").Expect("handles errors idiomatically").Run()

2. Structured text extraction:

  • Extract typed structs from unstructured text
  • Define a struct, pass a pointer, and schema is generated via reflection
  • Schema enforcement happens server-side through Claude's forced tool_use
  • Example usage: var m MountError s.Extract("device /dev/sdf already mounted with vol-0abc123", &m).Run() fmt.Println(m.Device) // "/dev/sdf"
  • Useful for log parsing, support tickets, and API normalization beyond just testing
Ad

Additional functionality

  • Eval for programmatic results
  • Compare for A/B testing
  • Batching support with 50% cost savings
  • Evaluator and Extractor interfaces for mocking
  • Includes 135+ tests

Development context

The entire SDK was built using Claude Code, from initial design through implementation, tests, and documentation. The creator is seeking feedback on API design and what would make this useful for developer workflows.

📖 Read the full source: r/ClaudeAI

Ad

👀 See Also