Journal — Week 17

Intro

Hi everybody, and thank you once again for reading my humble blog.

This week was tough, but in the end, it had a happy ending.

On my side, I had to jump in and help the developers by going into the “machine room” and configuring one of the central services we need: Amazon Cognito.

Besides that, we decided to temporarily stop working on the RAG system we had been developing so intensively and redirect all our efforts towards building the best possible LLM- and agent-based recommendation engine.

This was the approach I had been working on the previous week and presented to the team. They were a little surprised by this change—another one—so this week I made sure to discuss the topic calmly with one of the team members who was most affected by it. I also helped him join the new project and understand the new approach.

Managing Uncertainty

First, let’s talk about people.

Last week, I presented the team with the new approach for handling recommendations.

Until then, we had a main service that was half recommendation engine and half RAG. In theory, its mission was to return recommendations generated by an LLM and augmented with a RAG system containing curated synthetic data.

The RAG itself was in good shape by the end of June. While we continued curating the data, we also explored how we could outperform the frontier models. After all, they are our main competitors: ChatGPT and Claude.

From this research, we discovered that these models already perform extremely well without requiring any RAG system. We wanted to achieve similar results, so we investigated several approaches. In the end, we decided to use Anthropic’s Messages API.

At this point, I had already started developing, in parallel, the service that would provide an agentic chat experience to the final customer. I was also using the Messages API to power the agent, so I reached a simple conclusion: why not generate the recommendation in the same place?

It makes a lot of sense. The service already has the full context of the conversation and uses exactly the same engine. I could simply spin up a dedicated agent, and that would be it.

The Recommender-RAG component would remain as a pure RAG system and could eventually become part of the data pipeline in the future.

I explained the new architecture to the team, and they agreed with it, although they were understandably surprised by yet another architectural change. Most importantly, this affected the developer who had been responsible for the Recommender-RAG component.

Therefore, on Monday, I had a conversation with him about how he felt and listened to his concerns. I think it was a good discussion. He agreed with the new architecture and offered to help with the new project.

Later in the week, I onboarded him onto the project, and I hope he can start contributing soon. It is not an easy project, but I am ready to support him with anything he needs.

Cognito

Besides this, I also had to change context once again.

We are under significant pressure, and the developer responsible for the campaign activation module told me that he would not meet the deadline without additional help.

Therefore, I stopped what I was doing and immediately jumped into a completely new topic for me: configuring an identity provider from AWS—Amazon Cognito.

It was not especially difficult, and you may already know similar tools such as Auth0. However, the most interesting learning came from the circular conversation I had with the agentic coding tool.

As you may already know, we use AWS CDK to create our infrastructure as code, and Cognito is part of that infrastructure. However, in my opinion, not everything should necessarily be managed in the same way.

Interestingly, whatever I suggested, the agent was always against it. Perhaps it was right, and I will discover that in future iterations, but for now, I wanted to implement it in my own way.

I was so confused by how stubborn the agent was that I had to go back to the old-fashioned approach: reading the documentation and watching tutorials to fully understand the point of disagreement.

Once I understood the issue, I knew exactly what to tell the agent to achieve the outcome I wanted—and it worked.

The lesson here is that sometimes you want to move quickly and trust the AI, but you still need to know exactly where you want to go.

Conclusion and Final Notes

That was all for this week.

Besides that, just a short side note about the SKU product deduplication and ERP integration: everything is progressing according to plan.

I am happy to see it.