AACsearch
Dashboard & Operations

Knowledge Module & Admin

The Knowledge module for internal document Q&A (RAG/GraphRAG), and the admin section for site administrators.

Knowledge module

Important distinction: The Knowledge module is a separate product surface from storefront keyword search. Storefront search uses AACSearch for fast, typo-tolerant keyword queries against product catalogs. The Knowledge module is for internal Q&A over unstructured documents — PDFs, DOCX files, text documents — using AI retrieval (RAG and GraphRAG). The two surfaces are independent; they do not share indexes or data.

The Knowledge module is available at:

  • Org scope: /[orgSlug]/knowledge — knowledge spaces for the whole organization
  • Account scope: /knowledge — personal knowledge spaces

Knowledge spaces

A Knowledge space is a container for document sources and the Q&A interface. You can create multiple spaces (e.g. "Product Docs", "Internal Policies", "Support KB").

Each space is owned by either an organization or a user (owner discriminator pattern — the same model used for search indexes).

Data sources

Within a space, you add data sources — currently file uploads:

FormatSupport
PDFSupported
DOCXSupported
TXTSupported

When you upload a file, an ingestion job is created. The system:

  1. Parses the file into text
  2. Chunks the text using configurable chunking strategies
  3. Generates embeddings for each chunk (via OpenAI)
  4. Stores chunks in KnowledgeChunk with vector embeddings

Ingestion jobs

The ingestion jobs list shows status (running / completed / failed), file name, chunk count, and any errors.

Ask (RAG)

Once ingestion is complete, you can ask questions against the space. The ask flow:

  1. Embeds your query
  2. Retrieves the most relevant chunks via vector similarity
  3. Sends retrieved context + question to the LLM
  4. Returns the answer with source citations

GraphRAG

The GraphRAG feature builds a knowledge graph from the ingested documents:

  • GraphNode — concepts, entities, topics extracted from documents
  • GraphEdge — relationships between nodes

GraphRAG queries traverse the graph to provide deeper, more connected answers than plain RAG. Use GraphRAG for questions that require reasoning across multiple documents or topics.

Usage metrics

Each space tracks usage via the knowledge.usageMetrics procedure: total queries, token consumption, and per-source document counts.

Prisma models

The Knowledge module uses 7 dedicated Prisma models:

ModelPurpose
KnowledgeSpaceTop-level container, org or user owned
DataSourceFile source record (name, type, status)
IngestionJobIngestion tracking (status, progress, errors)
KnowledgeDocumentProcessed document
KnowledgeChunkIndividual text chunk for retrieval
GraphNodeKnowledge graph node (concept, entity)
GraphEdgeRelationship between graph nodes

oRPC procedures

The knowledge module exposes 10 procedures at packages/api/modules/knowledge/:

ProcedureDescription
listSpacesList all spaces for the owner
createSpaceCreate a new knowledge space
listSourcesList data sources for a space
createSourceAdd a new data source
listIngestionJobsList ingestion jobs for a space
ingestFileUpload and ingest a file
askAsk a question (RAG retrieval + LLM answer)
graphragExplainGraphRAG explanation query
usageMetricsToken and query usage stats

Admin section

The admin section is only visible to users with the site admin role. It is accessible at /admin/*.

Note: Several admin pages are currently stubs with placeholder content — they render the page layout but do not yet have full functionality. This is noted per page below.

Admin pages

PathDescriptionStatus
/admin/Admin dashboard rootFunctional
/admin/organizationsList and manage all organizationsFunctional
/admin/usersList and manage all users, impersonationFunctional
/admin/configSystem configurationStub — pending
/admin/securitySecurity settings and session managementStub — pending
/admin/integrationsThird-party integration settingsStub — pending
/admin/auditAudit log viewerStub — pending
/admin/walletAI wallet admin (per-user balance, transactions)Stub — active development (v0.6)
/admin/jobsBackground job managementStub — pending
/admin/notificationsSystem notification managementStub — pending

AI wallet and credits (v0.6 — active development)

The wallet system (@repo/billing-wallet) handles AI credit balances using a BigInt kopecks ledger. The wallet admin page at /admin/wallet and the user-facing AI credits page at /settings/billing/ai-credits are actively being developed as part of the v0.6 metering release. The Tochka payment driver (for RU market) is wired; Stripe is a parallel option.

The wallet feature is intentionally half-isolated — if your task does not involve billing or AI credits, do not extend it without explicit scope confirmation.


Account-level settings

Personal settings live outside the org context under /settings/.

PathContents
/settings/generalDisplay name, email, profile photo
/settings/securityPassword change, 2FA (TOTP), passkeys, OAuth connections
/settings/notificationsPer-type notification preferences
/settings/billingPersonal billing, active plan, payment method
/settings/billing/ai-creditsAI wallet top-up and transaction history (v0.6)

Security settings support: password login, magic link, two-factor authentication (TOTP via authenticator app), passkey (WebAuthn), and OAuth (Google, GitHub).

On this page