Skip to main content

Analytics Dashboard

The Analytics Dashboard API provides read-only operational metrics for indexed content quality and metadata rule performance. All analytics endpoints require a Pro plan or higher.

source_id works for both connectors and integrations.


Available Metrics​

EndpointWhat it measures
GET /api/analytics/{source_id}/chunk-size-distributionHistogram of chunk character lengths with mean/median/min/max stats
GET /api/analytics/{source_id}/metadata-hit-ratePer-rule: how many documents/chunks matched vs total applicable
GET /api/analytics/{source_id}/metadata-coveragePer-field: what fraction of chunks have a non-empty value
GET /api/analytics/{source_id}/chunks-per-documentHow many chunks each document produced, with summary stats
GET /api/analytics/{source_id}/inheritance-ratioFor chunk-level rules: self-matched vs inherited vs empty breakdown
GET /api/analytics/{source_id}/empty-metadataCount of chunks with zero metadata fields, with sample doc IDs
GET /api/analytics/{source_id}/rule-priority-auditFor fields with overlapping rules: which rule "won" most often

Detailed Metric Explanations​

Chunk Size Distribution​

Returns a histogram of chunk character lengths so you can tune chunk_size settings. Results include 100-character buckets plus summary stats (mean, median, min, max).

Metadata Hit Rate​

Shows per-rule effectiveness: how many documents (for document-level rules) or chunks (for chunk-level rules) matched each rule. Use this to identify rules that rarely match and may need pattern updates.

Metadata Coverage​

Shows per-field coverage ratio across all chunks. This helps spot metadata fields that are present in too few chunks and may reduce filter reliability.

Chunks Per Document​

Returns how many chunks each document produced, sorted by count descending, with summary stats. This helps identify oversized documents that may need different chunking settings.

Inheritance Ratio​

For chunk-level rules, breaks down how values were assigned:

  • self-matched (rule matched the chunk directly)
  • inherited (value carried from a preceding chunk)
  • empty (no value available)

Use this to verify chunk-level inheritance is working as expected.

Empty Metadata​

Returns the total number of chunks with zero metadata fields and up to 10 sample doc_id values for investigation.

Rule Priority Audit​

For metadata fields with two or more rules at different priorities, shows how many documents/chunks each rule "won". Use this to verify priority ordering is behaving correctly.


Usage Example​

curl -s http://localhost:8000/api/analytics/<source_id>/metadata-coverage \
-H "Authorization: Bearer <ACCESS_TOKEN>"