AGENT SKILL

openevidence-cost-tuning

Optimize OpenEvidence API costs and usage efficiency. Use when reducing API costs, implementing usage budgets, or optimizing DeepConsult spend for clinical AI applications. Trigger with phrases like "openevidence cost", "openevidence billing", "reduce openevidence spend", "openevidence budget", "openevidence pricing".

License 许可
MIT
最近更新
2026-05-26
Stars
★ 0
Forks
0

01 前言 Front Matter

name
openevidence-cost-tuning
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
version
1.0.0
description
Optimize OpenEvidence API costs and usage efficiency. Use when reducing API costs, implementing usage budgets, or optimizing DeepConsult spend for clinical AI applications. Trigger with phrases like "openevidence cost", "openevidence billing", "reduce openevidence spend", "openevidence budget", "openevidence pricing".
allowed-tools
Read, Write, Edit
compatible-with
claude-code, codex, openclaw

02 资源文件 1

03 SKILL.md 正文

OpenEvidence Cost Tuning

Table of Contents

Overview

Optimize OpenEvidence API costs while maintaining clinical decision support quality. Covers usage tracking, DeepConsult optimization, user quotas, and cost reporting.

Prerequisites

  • OpenEvidence billing dashboard access
  • Usage metrics configured
  • Understanding of pricing model
  • Budget authority

Pricing Model

Feature Unit Typical Cost
Clinical Query Per query Included in subscription
DeepConsult Per research synthesis Premium (100x query cost)
API Overage Per 1000 queries over limit Tier-dependent
Enterprise Features Monthly Custom pricing

Instructions

Step 1: Implement Usage Tracking

Create UsageTracker with Redis-backed daily/monthly counters per user and global. Track queries and DeepConsults separately with budget alerts at configurable thresholds.

Step 2: Optimize DeepConsult Usage

Build decision logic: use regular queries for simple questions (dosage, half-life, contraindications, side effects). Reserve DeepConsult for complex research (treatment comparisons, systematic reviews, emerging therapies). Cache DeepConsult results for 1 week.

Step 3: Implement User Quotas

Define tier-based quotas (free: 10/day, professional: 100/day + 10 DeepConsults/month, enterprise: 1000/day + 100 DeepConsults/month). Enforce with middleware.

Step 4: Build Cost Reporting

Generate periodic reports with breakdowns by specialty, user, and day. Include automated recommendations for high DeepConsult ratio, low cache hits, and concentrated usage.

Output

  • Usage tracking with Redis counters
  • Budget alert system with configurable thresholds
  • Smart DeepConsult decision logic
  • Tier-based user quota enforcement
  • Cost reporting dashboard with recommendations

Error Handling

Cost Issue Detection Resolution
Budget exceeded Alert triggered Implement throttling or upgrade tier
High DeepConsult costs Monthly report Review patterns, improve caching
Low cache efficiency Metrics show low hits Adjust TTL, increase cache size
User abuse Usage concentration Implement per-user quotas

Examples

DeepConsult Decision

// Simple question -> regular query (free)
"What is the dosage of metformin?" -> clinicalQuery

// Complex research -> DeepConsult (premium)
"Compare emerging therapies for treatment-resistant depression" -> deepConsult

See detailed implementation for advanced patterns.

Resources

04 同仓库更多 Skills

SamuelChien
SamuelChien/mega-skills-collection

zustand-store-ts

Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state/action separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zustand-store-creator

Zustand Store Creator - Auto-activating skill for Frontend Development. Triggers on: zustand store creator, zustand store creator Part of the Frontend Development skill category.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zero-trust-config-helper

Zero Trust Config Helper - Auto-activating skill for Security Advanced. Triggers on: zero trust config helper, zero trust config helper Part of the Security Advanced skill category.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zapier-integration-helper

Zapier Integration Helper - Auto-activating skill for Business Automation. Triggers on: zapier integration helper, zapier integration helper Part of the Business Automation skill category.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

zai-cli

Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP. Use when user needs image/video analysis, OCR, UI-to-code conversion, error diagnosis, real-time web search, web page to markdown extraction, or GitHub code exploration. Trigger with phrases like "analyze this image", "search the web for", "read this page", "explore this repo", or "use zai". Requires Z_AI_API_KEY.

★ 0
SamuelChien
SamuelChien/mega-skills-collection

yt-research

Research competitor YouTube channels, niches, and trending topics for your content strategy. Use this skill whenever the user says "research channels", "analyze competitors", "find trending topics", "niche analysis", "competitive research", "what are other creators doing", "scrape YouTube channels", or wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.

★ 0