Updated API specs

This commit is contained in:
Cyber MacGeddon 2026-03-17 13:16:47 +00:00
parent ab002e6edb
commit f6e588d408
13 changed files with 282 additions and 56 deletions

View file

@ -1,12 +1,22 @@
type: object
description: Document embeddings query response
description: Document embeddings query response with matching chunks and similarity scores
properties:
chunks:
type: array
description: Similar document chunks (text strings)
description: Matching document chunks with similarity scores
items:
type: string
type: object
properties:
chunk_id:
type: string
description: Chunk identifier URI
example: "urn:trustgraph:chunk:abc123"
score:
type: number
description: Similarity score (higher is more similar)
example: 0.89
example:
- "Quantum computing uses quantum mechanics principles for computation..."
- "Neural networks are computing systems inspired by biological neurons..."
- "Machine learning algorithms learn patterns from data..."
- chunk_id: "urn:trustgraph:chunk:abc123"
score: 0.95
- chunk_id: "urn:trustgraph:chunk:def456"
score: 0.82

View file

@ -1,12 +1,21 @@
type: object
description: Graph embeddings query response
description: Graph embeddings query response with matching entities and similarity scores
properties:
entities:
type: array
description: Similar entities (RDF values)
description: Matching graph entities with similarity scores
items:
$ref: '../../common/RdfValue.yaml'
type: object
properties:
entity:
$ref: '../../common/RdfValue.yaml'
description: Matching graph entity
score:
type: number
description: Similarity score (higher is more similar)
example: 0.92
example:
- {v: "https://example.com/person/alice", e: true}
- {v: "https://example.com/person/bob", e: true}
- {v: "https://example.com/concept/quantum", e: true}
- entity: {t: i, i: "https://example.com/person/alice"}
score: 0.95
- entity: {t: i, i: "https://example.com/concept/quantum"}
score: 0.82