The Anatomy of a GenAI System - Part 2

Eric Famanas

~8 min read

ETL as described by ChatGPT 4o (not quite there yet)

Picking up from part 1

In the previous edition of this mini-series on the system architecture for Generative AI systems, we discussed the very foundation of any system which relies on data for its features: the ETL (extract, transform, load) pipeline, specifically calling out the misconceptions of capabilities around the extraction and transform steps.

To recap: we all know that AI is not a magic bullet, but the declarative nature of LLM (Large Language Model) -based applications such as ChatGPT and DeepSeek makes it seem like they can do anything: a user can ask a non-formatted question or request, and the system will try its best to do it. However, the quality of these outputs, as we know, is reliant upon the data it is using. What is often glossed over is how that data gets into the system, and the answer to that consequently impacts the performance and responses of the GenAI.

It's not just enough to say "GenAI is not a silver bullet"; hell, I left the error-riddled image generated by ChatGPT as part of this blog just to demonstrate this. Nevertheless, we must educate ourselves as to why it's not a silver bullet for two reasons: 1) to appreciate what we have and the work that goes into it and 2) so that we can continue to iterate and improve so that it may one day be the solution we dream of.

How many (data) warehouses do we need? At least two.

Before we get too far ahead of ourselves, there is actually something I missed, and largely due to an oversight in my part; after all, I am a very literal ADHD-er, and when someone says an acronym like ETL, I only think about Extract, Transform and Load. However, there is also the important aspect on where and how the data gets stored.




A high-level ETL pipeline for collecting user engagement data

A high-level ETL pipeline for collecting user engagement data

To accompany the header image made in ChatGPT, I created a much simpler, high-level version of the ETL. In data ingestion pipelines, it would typically be best practice to have two different data storage solutions: one sitting after the extraction step and one sitting after the transformation step. The first one stores the raw, unaltered data and the second one stores the prepared, normalised data. Here, I use the term "normalised" as it would be applied in relational database normalisation, where a schema is developed based on the properties of the target data model. In this context, it can also be used as "prepared" or "processed" data ready to be delivered by the Load step of the ETL pipeline.

But I digress, why do we need two databases? Why not one? Surely, the only data we care about are the processed ingredients that go into our AI stew. The answer can be found by thinking about research papers. Why have citations and references? This is because we may have a need in the future to go back to the original source data for things like validating findings or error checking. AI systems are no different in this regard; to continuously improve and debug the AI model, the original reference data must be preserved and tested against.

Stepping outside of the AI model itself and considering the PESTLE (political, environmental, social, technological, legal and economical) factors that will influence the development of AI as an industry, the future of the landscape will be shaped by acts, such as those proposed by the UK and European Union place a heavy emphasis on transparency of implementation, to which the original source data will be audited. Having two data stores as part of the ETL pipeline may be a legal requirement for future software houses, if it is not one already.

A tale of two (or more) databases

This is where things start to get a bit complicated, but also less generic and more GenAI specific. I will try my best to keep it brief, but data storage, structures and algorithms is an incredibly deep topic, with courses ranging from just 16 hours on Udemy or similar, to full on undergrad and post-grad courses. Needless to say, any attempt to comprehensively capture these details within a single blog post will end in vain. So instead, I am just going to cover two ma points before getting into the heavy detail of GenAI structured databases in the next article.

First, the raw database structure or implementation is not really important as long as the Transform step of the pipeline is doing its job correctly. As long as the database is in an indexable format, the data can be unstructured; I have seen this in many forms ranging from storing electronics information to fintech applications. The important thing is that the data is discoverable, and following regulatory trends, can be referenced by at least the following dimensions:


  • Time: When the data was collected. Time can vary from locale, implementation, and even programming language (looking at you JavaScript) so it's best to use ISO 8601 derived from a Unix timestamp for date / time format, like what we see here.

  • Source: Where the data was collected, i.e. app telemetry, scraping, user contributions, etc. This is good for auditing, data insights and even CRM.

  • Type: Possibly the most important aspect. What kind of data was collected, does it contain PII? Does it violate any copyright?


In terms of data search-ability, it would be madness to use increments of 1,2,3... etc to index the data. Instead, the three properties mentioned can be used together to construct a natural key that will allow a human to scan and discern key information:

1741622667_IOS_TEL: { // data goes in here }

In the above example, we are using the unix timestamp (the time i am writing this article) the OS where the data came from, so Apple phones and tablets, and the type of data, user interaction telemetry. To a data analyst or an auditor, the nature of the data is immediately apparent and easily discoverable. From experience, this level of traceability is absolutely key in R&D Audits (UK), ISO-27001 and ISO 42001 certifications.

The second point is the misconception of the data problems. I often hear that "big data is a Google problem" when in reality, big data is everyone's problem. Yes, most companies do not have the data management problems like Google or Amazon, where miles of server farms need to be stood up to have adequate compute and storage to handle those large amounts of data.




Ah ChatGPT, the hardest thing to teach you is how to spell

Ah ChatGPT, the hardest thing to teach you is how to spell

However, the fundamental database architecture which supports the business must be scalable. Imagine a software application being that of a house, and the database is its foundation. Now, imagine that you discovered your database foundation can no longer support the horizontal and vertical scalability of your application (basically making the house either taller or larger) and you need to rebuild the entire foundation to compensate.

Have you ever tried to do that to a real house? It is expensive, highly-risky, incredibly invasive, etc. The amount of complexity involved in this process is significant enough to deter most attempts and force people down the path of "let's just work with what we have", which will ultimately limit their product's potential.

Looking at this problem from a different direction, it is very easy to fall into a pitfall of over-engineering, to which the architecture direction will aim to achieve something that is completely unattainable for the sake of "future proofing". I recall one time that a client wanted the database to have "near-infinite scalability" capable of handling "petabytes of data per second" on a budget of under half a million dollars. Theoretically speaking, this is perfectly achievable if the client was willing to wait for the full adoption of quantum computing founded on isolinear chips; unfortunately, the market won't wait until 2266 for this person's AI system to finally come online.

So at what point do we say good enough? Thankfully, there is a method I've been using:


  • Software, like any other technology, will not last forever, so a new major release should be planned at the end of horizon 3 of the product roadmap (however long that may be). This can be used as a temporal limitation for data volume estimation.

  • A user will produce data and will have access to new data extraction points exponentially year on year. This amount can take the form of an approximate value in MB, GB, or TB, depending on the application or product domain. The data veracity in this exercise will drive the size and type of data store needed (SQL vs NoSQL, document store, logs, PII).

  • A proper market penetration strategy will have an idea of how much market growth the product aims to achieve by H3 and the number of users contained therein. You can also use this to evaluate potential throughput, performance requirements.


By going through the exercise above should yield the types of data and a rough size of the amount of data that will need to be stored within the database to support the application or product. At the very least, it will help narrow down databasing solutions to just a select few architectures, and give project managers enough to go on when approaching vendors.

And don't forget to multiply the result by the number of data warehouses you need (so at least by 2)

On to Part 3!

Okay, that was a lot to take in, so let's take both a break and a reality check: most GenAI systems you encounter will already have databasing solutions in place and you, as an end user, may have little to no input on the vendor's decisions around this area. However, this does bring some important talking points to the table when discussing solutions with vendors:


  • Does the GenAI provider, such as an LLM solution or an AgentAI provider, have enough knowledge around their own databasing solutions?

  • Will their databasing solutions scale to ensure their product can support your business needs for at least 2-3 years, or H3 of your business strategy?


Just asking these two questions alone will quickly eliminate GenAI solutions who are just throwing a REST API client on top of an LLM service versus those who are providing an authentic and robust solution. So even if your business is not personally implementing the databasing solution, it's still important to be knowledgeable at a high level to protect your interests.

In the next article, we will go a bit more into this topic, but focus on the data structures that are used in big data management problems related to GenAI solutions. Happy ETL-ing!

Systems Orchestrator

CTO · Technology leadership