Lessons Learned While Embedding GenAI in a Product

Search for a command to run...

No comments yet. Be the first to comment.
Reflections on trust, synthetic media, and why the real challenge isn't the technology but it's what happens when we stop knowing what to believe.

This week I attended "Retrieval in the Age of Agents", a meetup organized by Qdrant and hosted at the Merantix AI Campus in Berlin. The event brought together representatives from Qdrant, Haystack (de

Vibe Coding vs AI Assissted Development

Disappointment A few weeks ago, I was in a fireside chat with Bob van Luijt, CEO & co-founder of Weaviate, where someone asked him about Knowledge Graphs. He ended his answer by saying, “I think that knowledge graphs are gonna cease to exist.”(You ca...

In this blog post I want to just simply gather any useful resource I found and updating it during my learning journey. Development LangChain What is LangChain? (YouTube video) (8mins) MCP MCP: Build Rich-Context AI Apps with Anthropic Knowledg...

In this blog, I want to collect the lessons I have learned whenever trying to somehow embed generative AI into any product. I am also planning to share your experience and references. Please comment here or send me a message on LinkedIn.
When you are reading this article, some of this learning might seem obsulute or so obvious, but for beginners or past-us, it was something to be learned!
There are many different ways to embed GenAI in a product or application. It can be as famous as a chat user interface or just a normal button, but behind the scenes, sending some data to a large model and reusing the output in complex ways, then as an outcome (response), just showing normal data in a table, chart, or just a simple change in the UI.
In most of the use cases, there are some common or similar practices. So from one use case to another, we can build on top of our learnings, and sharing learned lessons can help us to grow faster.
July 12th, 2024, lessons from an internal project using SAP AI Core, thanks to Mathis and Sherri for their mentorship and support.
Use the output model for enforcing output structure (e.g., JSON) and add a description to each field.
More info in this Medium blog post
Minimize the requested output as much as possible to get the response faster and cheaper.
Set the scene with roles and use system, user, and assistance roles when it makes sense.
Minimalistic prompt: try to define prompt as minimal as possible.
Use a structured prompt. Markdown, XML, or even JSON!
Don't give much freedom to the user if they don't know the underlying code; the functionality can be easily broken, and when it 50% doesn't work, the user gets frustrated!
A large output usually has more hallucinations, so we can't rely on the whole output size.