KG Intelligence API Overview
The KG Intelligence API provides AI-powered regulatory intelligence for pharmaceutical and life sciences companies. Built on a curated Knowledge Graph, the API enables event classification, regulatory mapping, risk assessment, and trend analysis for FDA compliance.
What is the Knowledge Graph?
The OrchestraPrime Knowledge Graph is a structured, evidence-backed database of regulatory knowledge including:
- FDA 483 Observations: 15,000+ observations from 2020-2024
- CFR Regulations: Complete Title 21 CFR with cross-references
- ICH Guidelines: Q7 (API GMP), Q9 (Risk Management), Q10 (Quality System)
- Event Taxonomy: 50+ quality event types with regulatory mappings
- Citation Analytics: Frequency data, trends, and benchmarks
The Knowledge Graph uses semantic embeddings and entity resolution to connect events, regulations, guidelines, and historical observations into a unified intelligence layer.
Core Capabilities
1. Event Classification
Automatically classify quality events and map them to applicable CFR regulations.
Use Cases:
- Classify FDA 483 observations during inspections
- Map deviations to regulatory requirements
- Identify applicable regulations for CAPA investigations
- Standardize quality event categorization
Endpoint: POST /v1/intelligence/classify
Example:
curl -X POST "https://LAMBDA_URL/v1/intelligence/classify" \
-H "Content-Type: application/json" \
-d '{
"event": "Equipment calibration records missing for temperature probe",
"product_type": "drug"
}'
Response Highlights:
- Event type classification with confidence score
- Applicable CFR sections (direct and indirect)
- Event category and default severity
- Full evidence provenance
2. Comprehensive Investigation
Perform deep investigation including classification, similar historical observations, ICH guideline mapping, and AI-powered risk assessment.
Use Cases:
- Investigate major deviations and out-of-specification events
- Research similar FDA 483 citations for precedent
- Identify relevant ICH guideline sections for compliance
- Generate data-driven risk assessments
- Support CAPA root cause analysis
Endpoint: POST /v1/intelligence/investigate
Example:
curl -X POST "https://LAMBDA_URL/v1/intelligence/investigate" \
-H "Content-Type: application/json" \
-d '{
"event": "Cleaning validation study did not include worst-case scenarios",
"product_type": "drug",
"include_similar": true,
"include_ich": true,
"include_risk_assessment": true
}'
Response Highlights:
- Event classification and applicable regulations
- Similar FDA 483 observations via semantic search
- Relevant ICH Q7/Q9/Q10 guideline sections
- AI-powered risk assessment with recommended actions
- Citation frequency and trending data
- Complete evidence chain
3. Regulatory Reference
Access complete CFR regulations and ICH guidelines with cross-references and citation analytics.
Use Cases:
- Reference CFR section details during procedure development
- Review ICH guideline requirements for harmonization
- Understand CFR-ICH alignment for global operations
- Access citation frequency data for risk prioritization
Endpoints:
GET /v1/intelligence/regulations/{cfr}- CFR section detailsGET /v1/intelligence/ich/{guideline}- Complete ICH guidelineGET /v1/intelligence/ich/{guideline}/{section}- Specific ICH section
4. Analytics and Trends
Retrieve industry-wide citation trends, frequency analysis, and regulatory focus areas.
Use Cases:
- Identify emerging regulatory focus areas
- Benchmark facility citation rates against industry
- Plan internal audit schedules based on trending citations
- Support strategic compliance planning
Endpoint: GET /v1/analytics/trends
Example:
curl -X GET "https://LAMBDA_URL/v1/analytics/trends?time_period=1y&product_type=drug" \
-H "Content-Type: application/json"
Response Highlights:
- Trending CFR citations with rank changes
- Event type frequency and severity distribution
- Geographic trends across regions
- Regulatory focus areas (CFR parts and subparts)
Entity Resolution Explained
What is Entity Resolution?
Entity resolution is the process of identifying and linking related entities across different data sources. The KG Intelligence API uses entity resolution to:
- Normalize Event Descriptions: Map natural language event descriptions to standardized event types
- Link Regulations: Connect events to applicable CFR sections and ICH guidelines
- Find Similar Observations: Use semantic search to identify related FDA 483 citations
- Establish Relationships: Create connections between regulations, guidelines, and events
How It Works
┌─────────────────────────────────────────────────────────────────┐
│ User Input (Natural Language) │
│ "Spider found in manufacturing area during production" │
└─────────────────────┬───────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Entity Resolver │
│ ┌───────────────────────── ─────────────────────────────────┐ │
│ │ 1. Text Analysis & Keyword Extraction │ │
│ │ Extract: "spider", "manufacturing area", "production" │ │
│ └──────────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ 2. Event Taxonomy Matching │ │
│ │ Match to: "pest_control" (confidence: 0.97) │ │
│ └──────────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ 3. Regulation Mapping │ │
│ │ Map to: 21 CFR 211.56 (Sanitation) │ │
│ └──────────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ 4. Semantic Search (Similar Observations) │ │
│ │ Find: Similar 483 citations with "pest" issues │ │
│ └──────────────────────────────────────────────────────────┘ │
└─────────────────────┬───────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ Structured Response │
│ - Classification: pest_control (category: sanitation) │
│ - Applicable Regulations: 21 CFR 211.56, 21 CFR 211.25 │
│ - Similar Observations: 3 FDA 483s with semantic similarity │
│ - Evidence Sources: Full provenance chain │
└─────────────────────────────────────────────────────────────────┘
Entity Resolution Components
| Component | Purpose | Technology |
|---|---|---|
| Event Taxonomy | Standardized event type classification | Curated taxonomy with 30 event types |
| CFR Mappings | Event → CFR section relationships | SME-curated mappings by product type |
| ICH Cross-References | CFR ↔ ICH guideline alignment | Harmonization mappings with alignment scores |
| Semantic Embeddings | Similar observation search | OpenAI text-embedding-3-small model |
| Evidence Framework | Source provenance tracking | P0 non-negotiable requirement |
Evidence Framework (P0 Non-Negotiable)
Every response from the KG Intelligence API includes complete evidence provenance. This is a P0 non-negotiable requirement ensuring transparency and traceability.
Evidence Sources
All assertions in API responses are backed by verifiable sources:
{
"evidence_sources": [
{
"source_type": "event_taxonomy",
"source_id": "event-taxonomy-v2.0.jsonl",
"retrieval_method": "keyword_match",
"confidence": 0.97
},
{
"source_type": "fda_483_database",
"source_id": "fda-483-embeddings-2020-2024",
"retrieval_method": "semantic_search",
"confidence": 0.89,
"documents_retrieved": 3
}
]
}
Evidence Chain
The evidence chain tracks integrity and coverage:
{
"evidence_chain": {
"chain_integrity": "verified",
"evidence_coverage": 0.94,
"provenance_complete": true,
"sources_verified": 4
}
}
Evidence Chain Status
| Status | Meaning | Action Required |
|---|---|---|
verified | All sources verified and complete | None - full confidence |
partial | Some sources unavailable or incomplete | Review response; may have gaps |
unverified | Sources could not be verified | Do not rely on response; contact support |
Source Types
| Source Type | Description | Confidence Level |
|---|---|---|
event_taxonomy | Curated event type taxonomy | High (0.90-1.0) |
cfr_regulations | Official CFR text from GPO | Absolute (1.0) |
ich_guidelines | Official ICH guideline documents | Absolute (1.0) |
fda_483_database | Historical FDA 483 observations | High (0.85-0.99) |
cfr_mapping | SME-curated CFR-event mappings | High (0.90-1.0) |
semantic_search | AI-powered similarity search | Medium-High (0.70-0.95) |
ICH Guidelines Cross-References
The Knowledge Graph includes complete ICH guidelines with CFR cross-references:
Supported Guidelines
| Guideline | Title | Sections | Use Cases |
|---|---|---|---|
| ICH Q7 | Good Manufacturing Practice Guide for Active Pharmaceutical Ingredients | 19 main sections | API manufacturing, GMP compliance, facility design |
| ICH Q9 | Quality Risk Management | 7 main sections | Risk assessment, FMEA, validation prioritization |
| ICH Q10 | Pharmaceutical Quality System | 5 main sections | Quality system design, lifecycle management |
CFR-ICH Alignment
ICH guidelines are harmonized with CFR requirements:
ICH Q7 Section 4.4 (Sanitation)
↓ (direct mapping, alignment: 0.95)
21 CFR 211.56 (Sanitation)
↓ (supporting mapping, alignment: 0.78)
21 CFR 211.67 (Equipment Cleaning)
Mapping Types
| Mapping Type | Description | Example |
|---|---|---|
| Equivalent | Near-identical requirements | ICH Q7 2.2 ↔ 21 CFR 211.22 (Quality Unit) |
| Related | Closely aligned requirements | ICH Q7 4.4 ↔ 21 CFR 211.56 (Sanitation) |
| Supporting | Complementary requirements | ICH Q7 12.1 ↔ 21 CFR 211.100 (Procedures) |
| Prerequisite | Foundational requirement | ICH Q7 4.4 → 21 CFR 211.42 (Facility Design) |
Architecture
Lambda Function URLs (Direct Access)
The KG Intelligence API uses Lambda Function URLs for direct, low-latency access without API Gateway overhead.
Dev0 Environment URLs:
- Intelligence API:
https://tmhyumqw2v24ddgj4lhis6cjay0vriqb.lambda-url.us-east-1.on.aws - Entity Resolver:
https://rr2xf4ngyteystdz3ok5eb7lga0bfage.lambda-url.us-east-1.on.aws
Benefits:
- Lower Latency: Direct Lambda invocation (50-100ms faster than API Gateway)
- Simplified Architecture: No API Gateway management overhead
- Cost Efficiency: No API Gateway request charges
- Native AWS Integration: Seamless integration with AWS services
System Architecture
┌─────────────────────────────────────────────────────────────────┐
│ Client Application │
└─────────────────────┬───────────────────────────────────────────┘
│
│ HTTPS Request (Lambda Function URL)
│
▼
┌─────────────────────────────────────────────────────────────────┐
│ KG Intelligence Lambda │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ API Route Handler │ │
│ │ - /v1/intelligence/classify │ │
│ │ - /v1/intelligence/investigate │ │
│ │ - /v1/intelligence/regulations/{cfr} │ │
│ │ - /v1/intelligence/ich/{guideline} │ │
│ │ - /v1/analytics/trends │ │
│ └──────────────────┬───────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────────────────────────────────────────┐ │
│ │ Entity Resolver Service (Lambda) │ │
│ │ - Event classification │ │
│ │ - Regulation mapping │ │
│ │ - Semantic search │ │
│ └──────────────────┬───────────────────────────────────────┘ │
└────────────────────┬┴──────────────────────────────────────────┘
│
┌────────────┼────────────┐
│ │ │
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ DynamoDB │ │ OpenSearch │ │ OpenAI API │
│ (Knowledge │ │ (Semantic │ │ (Embeddings) │
│ Graph) │ │ Search) │ │ │
└──────────────┘ └──────────────┘ └──────────────┘
Data Storage
| Component | Storage | Purpose |
|---|---|---|
| Event Taxonomy | DynamoDB | Event types and CFR mappings |
| CFR Regulations | DynamoDB | Complete Title 21 CFR text |
| ICH Guidelines | DynamoDB | Q7, Q9, Q10 full content |
| FDA 483 Observations | OpenSearch | Semantic search with embeddings |
| Citation Analytics | DynamoDB | Aggregated frequency data |
Available Endpoints
| Endpoint | Method | Authorization | Purpose |
|---|---|---|---|
| /v1/intelligence/classify | POST | Starter+ | Event classification and CFR mapping |
| /v1/intelligence/investigate | POST | Pro+ | Comprehensive investigation with risk assessment |
| /v1/intelligence/regulations/{cfr} | GET | Starter+ | CFR section details with ICH cross-references |
| /v1/intelligence/ich/{guideline} | GET | Starter+ | Complete ICH guideline with CFR mappings |
| /v1/intelligence/ich/{guideline}/{section} | GET | Starter+ | Specific ICH section with implementation guidance |
| /v1/analytics/trends | GET | Pro+ | Citation trends and regulatory analytics |
Authorization Tiers
| Tier | Included Endpoints | Rate Limit | Price |
|---|---|---|---|
| Starter | Classify, CFR Lookup, ICH Lookup | 1,000/day | Contact Sales |
| Pro | All Starter + Investigate, Analytics | 10,000/day | Contact Sales |
| Enterprise | All Pro + Unlimited, Export, Forecasts | Unlimited | Contact Sales |
Getting Started
1. Classify Your First Event
Start with event classification to understand the API's capabilities:
curl -X POST "https://tmhyumqw2v24ddgj4lhis6cjay0vriqb.lambda-url.us-east-1.on.aws/v1/intelligence/classify" \
-H "Content-Type: application/json" \
-d '{
"event": "Annual product review not completed for three batches",
"product_type": "drug"
}'
Expected Response:
- Event type:
documentation_deficiency - Category:
documentation - Applicable CFR: 21 CFR 211.192 (Production record review)
- Confidence: High (0.90+)
2. Investigate a Complex Event
For major deviations, use the comprehensive investigation endpoint:
curl -X POST "https://tmhyumqw2v24ddgj4lhis6cjay0vriqb.lambda-url.us-east-1.on.aws/v1/intelligence/investigate" \
-H "Content-Type: application/json" \
-d '{
"event": "Out-of-specification test result for dissolution, investigation incomplete",
"product_type": "drug",
"include_similar": true,
"include_ich": true,
"include_risk_assessment": true
}'
Expected Response:
- Event classification with high confidence
- Multiple applicable CFR sections (211.160, 211.165, 211.192)
- 3-5 similar FDA 483 observations
- Relevant ICH Q9 (risk management) and Q7 (laboratory controls) sections
- AI-powered risk assessment with recommended actions
3. Reference Regulations
Look up CFR sections for procedure development:
curl -X GET "https://tmhyumqw2v24ddgj4lhis6cjay0vriqb.lambda-url.us-east-1.on.aws/v1/intelligence/regulations/21-CFR-211.160" \
-H "Content-Type: application/json"
4. Explore ICH Guidelines
Access ICH guideline sections for harmonization:
curl -X GET "https://tmhyumqw2v24ddgj4lhis6cjay0vriqb.lambda-url.us-east-1.on.aws/v1/intelligence/ich/Q7/12.4" \
-H "Content-Type: application/json"
5. Monitor Trends
Track regulatory focus areas for strategic planning:
curl -X GET "https://tmhyumqw2v24ddgj4lhis6cjay0vriqb.lambda-url.us-east-1.on.aws/v1/analytics/trends?time_period=1y&product_type=drug&limit=10" \
-H "Content-Type: application/json"
Common Use Cases
Quality Assurance
- Deviation Classification: Classify deviations and identify applicable regulations
- CAPA Support: Research similar observations for root cause analysis
- Internal Audit Planning: Use trending citations to focus audit schedules
- Risk Assessment: Generate data-driven risk assessments for quality events
Regulatory Affairs
- Inspection Preparation: Research trending citations and likely focus areas
- Submission Support: Reference CFR and ICH requirements for submissions
- Regulatory Intelligence: Monitor shifting regulatory priorities
- Global Harmonization: Map CFR requirements to ICH guidelines
Quality Control / Laboratory
- OOS Investigation: Find similar OOS observations and regulatory requirements
- Method Validation: Reference ICH Q7 requirements for analytical methods
- Laboratory Controls: Map laboratory events to 21 CFR 211.160 requirements
- Data Integrity: Research data integrity citations and best practices
Executive Leadership
- Compliance Dashboards: Track citation trends vs. industry benchmarks
- Risk Reporting: Quantify regulatory risk exposure
- Strategic Planning: Identify emerging compliance priorities
- Resource Allocation: Prioritize compliance investments based on data
Best Practices
1. Use Specific Event Descriptions
Good: "Temperature excursion in stability chamber - readings exceeded 30°C for 4 hours" Better: Provides context for accurate classification and similar observation matching
Poor: "Temperature problem" Why: Vague description reduces classification confidence
2. Specify Product Types When Known
{
"event": "Particulate matter found in finished product",
"product_type": "drug"
}
Product type filtering returns only applicable regulations, reducing noise.
3. Review Evidence Sources
Always check the evidence_sources and evidence_chain fields:
{
"evidence_chain": {
"chain_integrity": "verified",
"evidence_coverage": 0.94,
"provenance_complete": true
}
}
If chain_integrity is not "verified", review the response carefully.
4. Adjust Similarity Threshold for Investigation
- High Threshold (0.85+): Precise matches for specific precedent research
- Medium Threshold (0.75-0.84): Balanced results for general investigation
- Low Threshold (0.65-0.74): Broader research for exploratory analysis
5. Leverage Risk Assessment Data
The AI-powered risk assessment includes:
- Risk Level: Critical, High, Medium, Low
- Impact Areas: Product quality, regulatory compliance, patient safety
- Recommended Actions: Prioritized corrective actions
- Citation Frequency: Historical data on similar citations
Use this data to support CAPA decisions and resource allocation.
Performance and Reliability
Response Times
| Endpoint | Typical Latency | Notes |
|---|---|---|
| Classify | 200-500ms | Depends on text complexity |
| Investigate | 1.0-2.5s | Includes semantic search and risk assessment |
| CFR Lookup | 100-300ms | Cached responses <50ms |
| ICH Guideline | 200-500ms | Full guideline larger response |
| ICH Section | 100-300ms | Single section faster |
| Analytics Trends | 600-1200ms | Aggregation over large dataset |
Caching
| Content Type | Cache Duration | Notes |
|---|---|---|
| CFR Regulations | 7 days | Quarterly updates |
| ICH Guidelines | 7 days | Infrequent updates |
| Classification Results | 24 hours | Based on text hash |
| Analytics Trends | 24 hours | Weekly data updates |
| Similar Observations | 24 hours | Static historical data |
Availability
- SLA: 99.9% uptime (Enterprise tier)
- Monitoring: CloudWatch metrics and alarms
- Failover: Multi-AZ Lambda deployment
- Backup: DynamoDB and OpenSearch automated backups
Data Currency
| Data Source | Update Frequency | Current Coverage |
|---|---|---|
| FDA 483 Observations | Weekly | 2020-2024 (15,000+ observations) |
| CFR Regulations | Quarterly | Title 21 (April 2024) |
| ICH Guidelines | As published | Q7, Q9, Q10 (latest versions) |
| Citation Analytics | Weekly | Rolling 5-year window |
Support and Resources
- Documentation: Full API reference at docs.orchestraprime.com
- Support: support@orchestraprime.com
- Sales: sales@orchestraprime.com
- Status Page: status.orchestraprime.com (planned)
Next Steps
- Explore Endpoints: Review detailed API endpoint documentation
- Test Integration: Use dev0 environment for testing (URLs provided above)
- Contact Sales: Discuss subscription tiers and pricing
- Review Use Cases: Identify high-value use cases for your organization
- Plan Deployment: Integrate KG Intelligence API into quality and regulatory workflows
Ready to get started? Begin with the Classify Event endpoint to see the power of the Knowledge Graph in action.
See Also
- Platform Intelligence Overview - How the KG Intelligence API connects to 483 inspections, Event Taxonomy, eCFR, ICH guidelines, and Warning Letters
- Event Taxonomy - Deep dive into the 30 event types and entity resolution algorithm
- 483 Inspection Intelligence - The 483 data pipeline that feeds the Knowledge Graph
- Supplier Monitoring Guide - Practical workflows for compliance monitoring using both 483 and KG APIs