AGENT SKILL

openevidence-performance-tuning

Optimize OpenEvidence clinical query performance and response times. Use when improving latency, optimizing query efficiency, or tuning caching for clinical AI applications. Trigger with phrases like "openevidence performance", "openevidence slow", "optimize openevidence", "openevidence latency", "speed up clinical queries".

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

01 前言 Front Matter

name
openevidence-performance-tuning
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
version
1.0.0
description
Optimize OpenEvidence clinical query performance and response times. Use when improving latency, optimizing query efficiency, or tuning caching for clinical AI applications. Trigger with phrases like "openevidence performance", "openevidence slow", "optimize openevidence", "openevidence latency", "speed up clinical queries".
allowed-tools
Read, Write, Edit
compatible-with
claude-code, codex, openclaw

02 资源文件 1

03 SKILL.md 正文

OpenEvidence Performance Tuning

Table of Contents

Overview

Optimize OpenEvidence clinical query performance for point-of-care response times. Covers query optimization, intelligent caching with TTL management, connection pooling, request batching, and performance monitoring.

Prerequisites

  • OpenEvidence integration running
  • Monitoring configured (see openevidence-observability)
  • Redis for caching
  • Access to performance metrics

Performance Targets

Metric Target Critical
Clinical Query P50 < 3s > 10s
Clinical Query P95 < 8s > 15s
Cache Hit Rate > 70% < 50%
DeepConsult Start < 5s > 15s

Instructions

Step 1: Optimize Query Construction

Remove filler words from questions, limit context to top 5 conditions and 10 medications, set maxCitations: 5 for faster responses.

Step 2: Implement Intelligent Caching

Build ClinicalQueryCache with SHA-256 key generation. Use dynamic TTL: 5min for stat/urgent, 24hr for pharmacokinetics/mechanisms, 1hr for guidelines, default for others.

Step 3: Enable Connection Pooling

Configure HTTPS agent with keepAlive: true, 10 max sockets, 5 max free sockets. Pre-warm connections on startup.

Step 4: Set Up Request Batching

Use DataLoader to batch concurrent queries (max 5 per batch, 50ms scheduling window) within rate limits.

Step 5: Add Performance Monitoring

Instrument queries with Prometheus histograms for latency by specialty/urgency/cached, plus cache hit/miss counters.

Output

  • Optimized query construction
  • Intelligent caching with dynamic TTL management
  • Connection pooling with keep-alive
  • Request batching via DataLoader
  • Performance metrics and monitoring

Error Handling

Performance Issue Detection Resolution
High P95 latency Metrics alert Check cache hit rate, optimize queries
Low cache hit rate < 50% hits Review TTL strategy, check key normalization
Connection timeouts Timeout errors Check keep-alive config, increase pool size
Memory pressure Redis alerts Implement LRU eviction, reduce TTLs

Examples

Cache TTL Strategy

Stat/urgent queries:      5 minutes
Pharmacokinetics/mechanisms: 24 hours
Treatment guidelines:     1 hour
Default clinical queries: configurable (default 1hr)

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