learning-it by example

#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.

1. For an agent's data architecture, which kind of question suits tables, which suits a vector index, and which suits a graph?
2. When all eight questions were asked of every store in the bike shop example, how many did the rows, documents and links stores get right?
3. In the bike shop example, which stores were needed to find the total of the orders of the people who complained about the helmet, and what was the total?
4. What is the behaviour of the documents store in the example when it is asked a question that it has no matching text for?
5. In the bike shop demo, what are the simple word-count vectors, compared with real embeddings?

Practice only: nothing is saved and no score counts towards anything. Each answer comes with the reason.

  1. 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.

  2. 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.

  3. 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.

  4. 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

All Enterprise architecture and AI agents videos

Related videos