Guides
The Problem
Without workthin, every AI-assisted resolution requires full context:
| Approach | Tokens per query | Monthly cost (10K queries) |
|---|---|---|
| Full context (no workthin) | 3,000-10,000 | $150-$500 |
workthin summary | ~100 | $5 |
workthin standard | ~500 | $25 |
Summary Strategy for Chatbots
For customer-facing chatbots, use summary by default:
const params = new URLSearchParams({
q: customerMessage,
detail: 'summary', // ~100 tokens
})
const res = await fetch(
`https://workthin.app/api/v1/search?${params}`,
{
headers: {
'Authorization': 'Bearer ' + process.env.WORKTHIN_API_KEY,
},
}
)summary returns only title and a body summary — enough for most auto-resolutions.
If the customer needs more detail, escalate to standard:
const detailed = await fetch(
`https://workthin.app/api/v1/knowledge/${knowledgeId}?detail=standard`,
{
headers: {
'Authorization': 'Bearer ' + process.env.WORKTHIN_API_KEY,
},
}
)Cost Calculation
| Without workthin | With workthin (summary) | |
|---|---|---|
| Queries/month | 10,000 | 10,000 |
| Tokens/query | ~5,000 | ~100 |
| Total tokens | 50M | 1M |
| Cost (GPT-4 pricing) | ~$500/mo | ~$10/mo |
| Annual savings | — | $5,880 |
For organizations with 100K+ queries/month, annual savings exceed $48,000.
Best Practices
- Default to
summaryfor automated integrations - Use
standardfor interactive CLI and dashboard workflows - Reserve
fullfor incident postmortems and deep analysis - Cache
summaryresponses — they rarely change and are small enough to store