#246 Enterprise architecture and AI agents 5.6 min
Data Architecture for AI Agents: Tables, Vectors, Graphs
I asked eight questions to three stores, and each got only its own kind right.
Sort the eight questions
Copy the code folder first. Open compare.py and read the eight questions. Without running anything, write down for each one whether it needs rows, documents or links, then check your answers against the third value in each tuple. Run python compare.py and note that each store gets only its own kind right.
A hint
Counts and sums need rows, policy sentences need documents, and who-did-what needs links.
Change the combined question
In compare.py, change "Who complained about the helmet?" to "Who complained about the lock?". Predict who the links store returns and what their orders total, then run python compare.py. When I ran it the output named Cat and a total of 25 pounds, although the printed label still says helmet complaints because it is fixed text. Then change the question back to the helmet one before the next task.
A hint
Cat has one order, a lock for 25 pounds.
Add a link
In data.py, add the link ("Cat", "complained about", "helmet") to LINKS. Predict who complained about the helmet and what their orders total, then run python compare.py. When I ran it the answer was Ana, Ben and Cat, with a total of 130 pounds.
A hint
Ana has orders worth 65, Ben 40 and Cat 25.
Reword a question
In compare.py, change "Which customer spent the most?" to "Which customer paid the most?". Predict what happens to the rows score, then run python compare.py. When I ran it the rows store got 2 of 8 right. Write one sentence on why the rows store, which matches fixed phrases, fails here.
A hint
The rows store looks for the exact phrase spent the most.
These tasks are for you to try on your own machine. Nothing is checked or saved.
What this does not show
Tiny made-up data and three stand-in stores written for these eight questions; no agent, model, lakehouse, vector database or graph database was run, and real systems overlap.
Up next in Enterprise architecture and AI agents
More in Enterprise architecture and AI agents
- #229 A Reference Architecture for Enterprise AI Agents, as Code
- #230 Agent Gateway: One Front Door for Models, Tools, Agents
- #231 MCP Gateway: Per-Tool Policy for Agent Tools (Python)
- #232 Give Every AI Agent Its Own Identity
- #233 Delegated Authority: Let an AI Agent Act for a User, Safely
- #234 Authorisation for AI Agents With Policy as Code (Cedar)
Related videos
- #238 Event-Driven AI Agents: Queues, Crashes and Duplicates Enterprise architecture and AI agents
- #03 pgvector vs Chroma vs Qdrant: Same Data, Real Results RAG and vector search
- #133 A/B Test Analysis in SQL and Python: z Test and Peeking SQL and analytics
- #157 Model Registry by Hand: Versions, Promote, Roll Back MLOps and deployment
