ArangoDB collections

Every collection in the GENIE.AI knowledge graph with field schema.

Purpose

The canonical list of every ArangoDB collection used by GENIE.AI, with field names and types. Useful when writing an AQL query, debugging a missing field, or wiring a new microservice.

Note: this page covers the most-frequently-used collections. The complete list (defined in 001-create-collections.js) also includes sessions, sessionQueries, userSessions, userConversations, conversationCategories, queryMessages, conversationFiles, queryCategories, categoryServices, serviceTranslations, serviceTranslationsEdge, folders, userFolders, folderConversations, analytics, weatherRequests, labels, crawl_job, crawl_log, crawl_metrics.

User-facing collections

users

FieldTypeNotes
_keystringArangoDB-generated; UUID is a convention but any string works
iss_substringKeycloak <iss> + <sub> composite (indexed, unique)
issstringKeycloak issuer URL
substringKeycloak subject
emailstringindexed (non-unique)
namestringDisplay name (combined from Keycloak name or preferred_username)
emailVerifiedboolMirrors Keycloak email_verified claim
rolesarrayRealm roles from Keycloak JWT (decodedToken.realm_access.roles); e.g. ["Admin"] / ["dataprep-service"] / []
activeboolFalse-when-deleted soft-delete marker
deletedboolSoft-delete flag
createdAtISO-8601
updatedAtISO-8601

conversations

FieldTypeNotes
_keystringUUID
titlestring
lastMessagestringPreview of the latest message content
createdISO-8601
updatedISO-8601
messageCountint
isStarredbool
isArchivedbool
categorystringOptional category label
tagsarray

The link between a conversation and its owning user lives in the userConversations edge collection (_from: users/<id>, _to: conversations/<id>), not as a userId field on the conversation document.

messages

FieldTypeNotes
_keystringUUID
conversationIdstringFK → conversations
contentstringmessage body
timestampISO-8601
senderstringuser / assistant / system
sequenceintper-conversation ordering
readStatusbool
metadataobjectfree-form; metadata.source_documents holds cited chunks on assistant messages

queries

FieldTypeNotes
_keystringUUID
userIdstringFK → users
sessionIdstringFK → sessions
timestampISO-8601
isAnsweredboolflipped to true when streaming completes
categoryIdstringnullable FK → serviceCategories
serviceIdarraynullable FKs → services
responseTimeintmilliseconds
contextOptionstringbackend mode (e.g. conversation-with-context-labels)
messagesarrayconversation history at query time
contextobjectrequest-time context (e.g. translated conversation)
textstringuser query text
responsestringassistant output (set on finalizeStreamQuery)
metadata.source_documentsarraycited chunks (set on finalize)
metadata.confidence_scorefloat0.0–1.0 (final, calibrated)
metadata.retrieval_confidence_scorefloat0.0–1.0 (rank-weighted retrieval)
metadata.is_groundedbool
metadata.self_confidencefloatLLM self-reported confidence (only when LLM_SELF_CONFIDENCE_ENABLED=true)

User feedback ({vote, comment, at}) is not stored on the queries document — it goes into the analytics collection (see Analytics collections).

serviceCategories

FieldTypeNotes
_keystringUUID
catCodestringoptional slug, e.g. cat1
orderintdisplay order
nameENstringSource of truth — what the RAG pipeline reads

Description text is not stored on the category doc; it lives in the serviceCategoryTranslations collection (one row per language).

services

FieldTypeNotes
_keystringUUID
nameENstringSource of truth
categoryIdstringFK → serviceCategories (snapshot at creation; ordering lives on the edge)

Ordering of services within a category lives on the categoryServices edge collection (order field on the edge document), not on the service document itself.

serviceCategoryTranslations

Translation rows. Keys follow ${sourceKey}_${languageCode}.

FieldTypeNotes
_keystringUUID
serviceCategoryIdstringFK → serviceCategories (matches the idx_serviceCategory_language index fields)
languageCodestringe.g. es, fr
namestringtranslated
descriptionstringtranslated

Edge collection serviceCategoryTranslationsEdge joins the two.

Knowledge-base collections

files

FieldTypeNotes
_keystringUUID
file_idstringUUID (denormalized copy of _key)
file_namestring
file_sizeintbytes
file_typestringMIME type
storage_pathstringserver-local (see document-repository component)
file_hashstringSHA-256 of the bytes
labelsarraytaxonomy labels assigned during ingestion
authorstringdisplay name (default '')
uploaded_dateISO-8601
create_dateISO-8601filesystem birthtime
crawl_dateISO-8601populated when ingested via the crawler; '' otherwise
source_urlstringURL when ingested via the crawler; '' otherwise
languagestringe.g. en, fr, or unknown
chunk_countintupdated by dataprep
dataprep.statusstringPending / Processing / Completed / Failed
dataprep.ingest_dateISO-8601set on successful ingestion
dataprep.retract_dateISO-8601set when the file is retracted

Schema documented here matches the document-repository component (metadataService.js); see the component for the canonical source.

${GRAPH_NAME}_SOURCE

One collection per named graph (default ARANGO_GRAPH_NAME: GRAPH, yielding chunk collection name GRAPH_SOURCE). Holds the chunk-level nodes.

FieldTypeNotes
_keystringUUID
textstringchunk content
file_idstringFK → files
chunkIndexintwithin file
labelsarray of stringtaxonomy labels
embeddingarray of floatvector
metadataobjectsource, page, language, …

Edge collection — chunk A → chunk B if the retriever found a relevance edge during ingestion (used by the hybrid retriever’s graph-traversal step).

${GRAPH_NAME}_HAS_SOURCE

Edge collection — chunk A → file B (chunk belongs to file).

${GRAPH_NAME}_FILE_LABELS (planned — not implemented)

This collection is referenced by the labeling-strategy design doc (RAG pipeline → Data labelling strategy) but is not yet implemented — grep -r FILE_LABELS across genie-ai-overlay/ returns zero hits. Per-file aggregated labels are currently held in-memory by the dataprep pipeline; the dedicated collection is on the roadmap. Do not assume its existence in code.

Analytics collections

events

FieldTypeNotes
_keystringUUID (auto-generated)
userIdstringnullable (anonymous events allowed)
eventTypestringpage_view / chat_started / feedback / …
timestampISO-8601
dataobjectevent payload

ingestion_log

FieldTypeNotes
_keystringUUID (auto-generated)
file_idstringFK → files
timestampISO-8601set by fileService.js to the entry write time
levelstringINFO / WARN / ERROR (set by the dataprep POST body)
stagestringingestion phase, e.g. chunking, labeling, embedding, indexing (set by the dataprep POST body)
messagestringfree-form progress

Used by the admin dashboard’s Ingestion log view. Query pattern: FOR d IN ingestion_log FILTER d.file_id == "<id>" SORT d.timestamp ASC RETURN d.message.

Indexes

The bootstrap script (002-create-indexes.js) creates these named indexes on the listed collections:

  • users — idx_users_iss_sub_unique (persistent, iss_sub, unique) and idx_users_email (persistent, email, non-unique)
  • sessions — idx-active-lastActiveTime (active, lastActiveTime)
  • conversationFiles — idx_conversationFiles_conversationId (conversationId)
  • serviceCategoryTranslations — idx_serviceCategory_language (serviceCategoryId, languageCode, unique), idx_serviceCategoryId, idx_languageCode_sct, idx_createdAt_sct
  • serviceTranslations — idx_service_language (serviceId, languageCode, unique), idx_serviceId_st, idx_languageCode_st, idx_createdAt_st
  • services — idx_categoryId_order (categoryId, order), idx_createdAt_services
  • ingestion_log — idx_ingestion_log_file_id (file_id), idx_ingestion_log_timestamp (timestamp)
  • crawl_job — idx_crawl_job_file_id (file_id, unique), idx_crawl_job_status (status)
  • crawl_log — idx_crawl_log_file_id (file_id), idx_crawl_log_timestamp (timestamp)
  • crawl_metrics — idx_crawl_metrics_file_id (file_id, unique)

Vector indexes on ${GRAPH}_SOURCE (embedding) are created at runtime by the retriever/dataprep Python code, not by the migration script.