Skip to content

Commit 3c62794

Browse files
Docs: Add Architecture page (#169)
## Description 📝 Adds a page for Architecture that's purposefully very broad. If you take a peek at the categories in the sidebar, we enter with the quickstart for end users and then build by talking about capabilities, steering, and use cases. This is the first page in the Core Concepts section and is meant to be as high-level of an overview as possible. We could—and should—introduce a section within this page that highlights differences between the data and control planes. But, for now, this simply serves to illustrate the various services that are running and how they work together to produce the end-user experience. An easy way to think of this: what's (relevant) in the root `compose.yaml` and what does each service do? ## Quick Links 🚀 [Architecture](https://robdominguez-doc-2910-add-ar.promptql-docs.pages.dev/architecture/)
1 parent 7476b41 commit 3c62794

File tree

2 files changed

+75
-1
lines changed

2 files changed

+75
-1
lines changed

docs/architecture.mdx

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
sidebar_position: 1.9
3+
sidebar_label: Architecture
4+
description:
5+
"Learn about the high-level architecture of PromptQL and the importance of the semantic metadata layer in giving you
6+
reliable and accurate answers to your questions."
7+
keywords:
8+
- promptql
9+
- architecture
10+
---
11+
12+
# Architecture
13+
14+
## Introduction
15+
16+
Below, you'll find a functional overview of PromptQL's architecture and the key components that power it. At the heart
17+
of PromptQL is the **semantic metadata layer** — the intelligent foundation that makes natural language data queries
18+
possible.
19+
20+
## High-level overview
21+
22+
```mermaid
23+
24+
flowchart TD
25+
Client[Client] --> PlaygroundServer[Playground Server]
26+
Metadata[Semantic Metadata] --> PlaygroundServer
27+
PlaygroundServer --> LLM[LLM-of-choice]
28+
LLM --> QueryPlan[Query Plan]
29+
QueryPlan --> PlaygroundServer
30+
PlaygroundServer --> Runtime[Python Runtime]
31+
Runtime --> Engine[Distributed Query Engine]
32+
Engine --> Connectors[Data Connectors]
33+
Connectors --> DataSources[Data Sources]
34+
```
35+
36+
## How it works
37+
38+
### Request initiation
39+
40+
When you ask PromptQL a question, the **Playground Server** receives your natural language query and combines it with
41+
your **semantic metadata** — the intelligent layer that describes your connected data sources, schemas, relationships,
42+
business logic, and access controls.
43+
44+
This metadata layer is generated automatically when you connect a data source and evolves as you and your team use
45+
PromptQL.
46+
47+
### Query plan generation
48+
49+
The Playground Server sends both your question and the semantic metadata to your chosen LLM. **This semantic context is
50+
what transforms a general-purpose LLM into a data expert for your specific organization.** The metadata tells the LLM
51+
exactly what data exists, how it's structured, what different fields mean in your business context, and how tables
52+
relate to each other.
53+
54+
With this rich context, the LLM generates a precise query plan that maps your natural language request to the right data
55+
operations.
56+
57+
### Query execution
58+
59+
The Playground Server passes the query plan to PromptQL's **Python runtime**, which executes it through the
60+
**distributed query engine**. The engine uses **data connectors** to fetch data from your **data sources**, respecting
61+
all access controls and mappings defined in your metadata.
62+
63+
### Response delivery
64+
65+
The retrieved data flows back through the same path: from data sources through connectors, engine, and runtime, where
66+
it's packaged and returned to you via the Playground Server.
67+
68+
This architecture ensures that your LLM has complete context about your data landscape while maintaining security and
69+
performance through the distributed execution layer.
70+
71+
## Next steps
72+
73+
With a broad perspective of the different services powering a PromptQL application, we recommend learning more about the
74+
[semantic metadata layer](/data-modeling/overview.mdx) next.

src/theme/DocSidebar/categories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const CATEGORY_CONFIG: Record<string, CategoryConfig> = {
1212
},
1313
coreConcepts: {
1414
title: 'Core Concepts',
15-
directories: ['data-modeling', 'data-sources', 'business-logic', 'auth'],
15+
directories: ['architecture', 'data-modeling', 'data-sources', 'business-logic', 'auth'],
1616
exactMatch: false,
1717
},
1818
buildingApps: {

0 commit comments

Comments
 (0)