Imagine you are hired as an AI engineer in a trading firm focused on the stock market.
(by the way, congratulations!)
The CEO wants you to build some AI system to help the trading team make better decisions, using all these fancy things he/she reads every day on LinkedIn like LLMs, Agentic RAGs, Vector Databases, and blah blah blah.
My experience
This scenario is super common these days, and it applies to all kinds of companies and industries. The potential automation that AI can bring is too big to ignore, so companies are super eager to find AI engineers (like you and me) to help them build internal tools that can improve their bottom line by automating and scaling repetitive tasks their human employees do.
The idea is simple:
Instead of having one person spending X minutes doing task Y, you have an AI system does the same task in a fraction of the time, and more importantly, better. So that person can focus on other less automatable tasks, that move the needle for the business.
Now, the question is:
"How do I know what AI system I need to build"
This is one of the first and most important questions you need to answer at the onset of every AI/ML project.
This is a question I have had to answer more than 15 times in the last 10 years working as an ML engineer.
And I haven't always answered it correctly from the start. So today, I want to share you a few tips to help you design the system your client or company really needs. So you don't end up building something that will never see the light of day.
Let's start.
Don't code yet!
When you work as a professional AI engineer, especially as a contractor in the freelance world, you are not just a code monkey.
There is no one telling you what you need to build. You need to figure that out. And this is, in my humble opinion, where the gap between good and great AI engineer is.
Because every project starts from a business problem. And it is your job to figure out what the right solution is, and then implement it, deploy it, scale it, etc.
In our case, the CEO of the trading firm wants us to increase the trading profits by "helping the trading team make better decisions". That is a very vague statement. But hey, this is how most of the startup founders and CEOs I have worked with talk.
To understand what "help the trading team make better decisions" means, you need to... guess what?...
TALK TO THE TRADING TEAM!
And I mean, really talk to them. And listen, really listen.
These are the guys who should use and benefit from the AI system you are building.
So you better build something that helps them. Otherwise, your super fancy Agentic RAG will go to the shelf of projects that will never see the light of day.
For example
In our case, human traders are guys who non-stop do 3 things:
Data ingestion -> traders follow relevant news and other market events for the asset, sector or companies the trader is interested in.
Analysis -> traders analyze its potential impact taking into account all the market context, and human expertise the human trader has.
Trading plan -> traders craft a trading plan, and execute it.
If you want to help them, you need to build something that helps them move faster from data ingestion to trading plan.
In other words, you need to design a system that can automatically generate trading ideas, that our human traders can then approve or not.
Let's go step by step.
Data ingestion
The first step is to ingest external data sources, like news, social media.. into the system.
Of course, the better your sources are, the better your system will be. Bad sources will only make your system worse, no matter how good your LLMs are. So you need to find the best sources for your use case.
In our case, we will use a combination of RSS feeds, and a custom API that we will build to ingest news from the web.
These news are pushed in a pub/sub system, like Apache Kafka, NATS or Zenoh, to decouple the data ingestion from the rest of the system.
Signal filtering
Now, most of the news are not relevant for the trader. So we need to filter them out.
This is what the second service does, again pushing the filtered news to the pub/sub system.
Truly powerful AI systems are not just about automating tasks. They are about automating tasks while giving the human the control to tweak the system to their needs.
In our case, the human trader needs to be able to tweak the system to their needs, for example, set a threshold for the signal strength.
Analysis and strategy generation
This is the most complex part of the system, as it involves pulling data like company reports, charts, news... and blending that with the recent news, to come up with a potential trading idea.
In practice, you can implement this as a Python streaming service that wraps a basic Research Agent. Quix Streams plus a Langgraph agent is a good starting point. And if you want to break the bank, you can build something similar to Claude Research Agent.
By playing with different prompts you can focus on different aspects of the research, like:
Fundamental analysis
Technical analysis
Macro news
The output at this step is a research report, together with a trading idea.
This is then handed to the human trader, who needs to analyze the research report, and the trading idea, and decide if it is a good idea to trade.
BOOM!
Wanna build a system like this from scratch, with me?
On October 6th, I will start the first cohort of the LLMOps bootcamp -> "Let's build an agentic trading platform. Together".
The idea is simple.
We will design, build, deploy and scale a production-ready semiautonomous agentic system on Kubernetes.
Step by step.
And we won't be alone. Marius Rugan, the best infra engineer I have met in my life (and I have met quite a few) will be teaching too.
We will work super hard for 2-3 months and live code together 50+ hours, to build from scratch a semi-autonomous production-ready agentic system for trading idea generation, that we will deploy and operate on Kubernetes.
Along this journey, you will learn:
Universal design patterns for building real time agentic systems.
How to deploy your own LLM servers on Kubernetes and NVIDIA GPUs.
Real time data processing, transport (Kafka), and storage (Real time DBs and VectorDBs).
Structured output generation and tool usage to guide agents to success.
Vanilla, RAG and Agentic RAG to increase model output quality.
Continuous Integration and Continuous Deployment with Kubernetes.
Gift 🎁
As a subscriber to the Real World ML Newsletter you have exclusive access to a 35% discount if you enrol in the following 14 days. After that, the price will go up.
See you on the other side,
Pau