A breakdown of 𝗗𝗮𝘁𝗮 𝗣𝗶𝗽𝗲𝗹𝗶𝗻𝗲𝘀 𝗶𝗻 𝗠𝗮𝗰𝗵𝗶𝗻𝗲 𝗟𝗲𝗮𝗿𝗻𝗶𝗻𝗴 𝗦𝘆𝘀𝘁𝗲𝗺𝘀 👇 And yes, it can also be used for LLM based systems!
It is critical to ensure Data Quality and Integrity upstream of ML Training and Inference Pipelines, trying to do that in the downstream systems will cause unavoidable failure when working at scale.
There is a ton of work to be done on the Data Lake or LakeHouse layer. 𝗦𝗲𝗲 𝘁𝗵𝗲 𝗲𝘅𝗮𝗺𝗽𝗹𝗲 𝗮𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲 𝗯𝗲𝗹𝗼𝘄.
𝘌𝘹𝘢𝘮𝘱𝘭𝘦 𝘢𝘳𝘤𝘩𝘪𝘵𝘦𝘤𝘵𝘶𝘳𝘦 𝘧𝘰𝘳 𝘢 𝘱𝘳𝘰𝘥𝘶𝘤𝘵𝘪𝘰𝘯 𝘨𝘳𝘢𝘥𝘦 𝘦𝘯𝘥-𝘵𝘰-𝘦𝘯𝘥 𝘥𝘢𝘵𝘢 𝘧𝘭𝘰𝘸:
𝟭: Schema changes are implemented in version control, once approved - they are pushed to the Applications generating the Data, Databases holding the Data and a central Data Contract Registry.
Applications push generated Data to Kafka Topics:
𝟮: Events emitted directly by the Application Services.
👉 This also includes IoT Fleets and Website Activity Tracking.
𝟮.𝟭: Raw Data Topics for CDC streams.
𝟯: A Flink Application(s) consumes Data from Raw Data streams and validates it against schemas in the Contract Registry.
𝟰: Data that does not meet the contract is pushed to Dead Letter Topic.
𝟱: Data that meets the contract is pushed to Validated Data Topic.
𝟲: Data from the Validated Data Topic is pushed to object storage for additional Validation.
𝟳: On a schedule Data in the Object Storage is validated against additional SLAs in Data Contracts and is pushed to the Data Warehouse to be Transformed and Modeled for Analytical purposes.
𝟴: Modeled and Curated data is pushed to the Feature Store System for further Feature Engineering.
𝟴.𝟭: Real Time Features are ingested into the Feature Store directly from Validated Data Topic (5).
👉 Ensuring Data Quality here is complicated since checks against SLAs is hard to perform.
𝟵: High Quality Data is used in Machine Learning Training Pipelines.
𝟭𝟬: The same Data is used for Feature Serving in Inference.
Note: ML Systems are plagued by other Data related issues like Data and Concept Drifts. These are silent failures and while they can be monitored, we can’t include it in the Data Contract.
Let me know your thoughts! 👇
#LLM #AI #MachineLearning
Memory in AI agents seems like a logical next step after RAG evolved to agentic RAG.
RAG: one-shot read-only
Agentic RAG: read-only via tool calls
Memory in AI agents: read-and-write via tool calls
Obviously, it's a little more complex than this.
I make my case here: https://t.co/KyzloUFmw4
MCP & A2A (Agent2Agent) protocol, clearly explained!
Agentic applications require both A2A and MCP.
- MCP provides agents with access to tools.
- A2A allows agents to connect with other agents and collaborate in teams.
Let's understand what A2A is and how it can work with MCP:
> What is A2A?
A2A (Agent2Agent) enables multiple AI agents to work together on tasks without directly sharing their internal memory, thoughts, or tools.
Instead, they communicate by exchanging context, task updates, instructions, and data.
> A2A <> MCP
AI applications can model A2A agents as MCP resources, represented by their AgentCard (more about cards in next tweet).
Using this, AI Agents connecting to an MCP server can discover new Agents to collaborate with and connect via the A2A protocol.
> Agent Cards (ID cards for Agents)
A2A-supporting Remote Agents must publish a JSON Agent Card detailing their capabilities and authentication.
Clients use this to find and communicate with the best agent for a task.
> What makes A2A powerful?
- Secure collaboration
- Task and state management
- UX negotiation
- Capability discovery
- Agents from different frameworks working together
Additionally, it can integrate with MCP.
While it's still a bit new, it's good to standardize Agent-to-Agent collaboration, similar to how MCP does for Agent-to-tool interaction.
What are your thoughts?
Here's a graphic summarising what we discussed:
RAID combines multiple drives into one logical unit to boost speed, reliability, or both. Each RAID level strikes a different balance between performance, fault tolerance & capacity 😎👇
Find pdf books with all my #Linux related infographics from https://t.co/3t6LHw8TIY
This repo literally teaches you how to build end-to-end RAG applications!
- hands-on guide
- Noteboos with explanation
- Intro to Advanced implementations
- All for FREE
Find the repo link 🧵 👇
fantastic simple visualization of the self attention formula. this was one of the hardest things for me to deeply understand about LLMs.
the formula seems easy. you can even memorize it fast. but to really get an intuition of what the Q,K,V represent and interact, that’s hard.
This repository is all you need to learn and build a RAG application!
It’s a comprehensive repository covering Retrieval-Augmented Generation from the ground up.
Here’s what it covers:
• Query Construction – Translating natural language into structured queries (SQL, Cypher, or vector-based retrieval). (Text-to-SQL, Text-to-Cypher, Self-query retriever)
• Query Translation – Decomposing and rephrasing inputs for better retrieval. (Multi-query, RAG-Fusion, Hypothetical Docs)
• Routing – Dynamically selecting the right database or embedding query context for more relevant answers.
• Retrieval – Ranking and refining retrieved data using Re-Rank, RankGPT, RAG-Fusion, CRAG, or even pulling real-time updates from external sources.
• Indexing – Leveraging multi-representation embeddings, hierarchical summarization, and structured search optimization. (RAPTOR, CoLBERT, Fine-tuning)
• Generation – Producing and refining responses with Self-RAG and RRR, enabling iterative reasoning and retrieval loops when needed.
Each notebook provides a detailed, hands-on guide to setting up and experimenting with RAG, from introductory concepts to advanced implementations like multi-querying and custom RAG builds.
Fundamentals of a 𝗩𝗲𝗰𝘁𝗼𝗿 𝗗𝗮𝘁𝗮𝗯𝗮𝘀𝗲.
With the rise of GenAI, Vector Databases skyrocketed in popularity. The truth - Vector Databases are also useful outside of a Large Language Model context.
When it comes to Machine Learning, we often deal with Vector Embeddings. Vector Databases were created to perform specifically well when working with them:
➡️ Storing.
➡️ Updating.
➡️ Retrieving.
When we talk about retrieval, we refer to retrieving set of vectors that are most similar to a query in a form of a vector that is embedded in the same Latent space. This retrieval procedure is called Approximate Nearest Neighbour (ANN) search.
A query here could be in a form of an object like an image for which we would like to find similar images. Or it could be a question for which we want to retrieve relevant context that could later be transformed into an answer via a LLM.
Let’s look into how one would interact with a Vector Database:
𝗪𝗿𝗶𝘁𝗶𝗻𝗴/𝗨𝗽𝗱𝗮𝘁𝗶𝗻𝗴 𝗗𝗮𝘁𝗮.
1. Choose a ML model to be used to generate Vector Embeddings.
2. Embed any type of information: text, images, audio, tabular. Choice of ML model used for embedding will depend on the type of data.
3. Get a Vector representation of your data by running it through the Embedding Model.
4. Store additional metadata together with the Vector Embedding. This data would later be used to pre-filter or post-filter ANN search results.
5. Vector DB indexes Vector Embedding and metadata separately. There are multiple methods that can be used for creating vector indexes, some of them: Random Projection, Product Quantization, Locality-sensitive Hashing.
6. Vector data is stored together with indexes for Vector Embeddings and metadata connected to the Embedded objects.
𝗥𝗲𝗮𝗱𝗶𝗻𝗴 𝗗𝗮𝘁𝗮.
7. A query to be executed against a Vector Database will usually consist of two parts:
➡️ Data that will be used for ANN search. e.g. an image for which you want to find similar ones.
➡️ Metadata query to exclude Vectors that hold specific qualities known beforehand. E.g. given that you are looking for similar images of apartments - exclude apartments in a specific location.
8. You execute Metadata Query against the metadata index. It could be done before or after the ANN search procedure.
9. You embed the data into the Latent space with the same model that was used for writing the data to the Vector DB.
10. ANN search procedure is applied and a set of Vector embeddings are retrieved. Popular similarity measures for ANN search include: Cosine Similarity, Euclidean Distance, Dot Product.
How are you using Vector DBs? Let me know in the comment section!
Join me in a 𝗳𝗿𝗲𝗲 𝘄𝗲𝗯𝗶𝗻𝗮𝗿 𝘁𝗵𝗶𝘀 𝗧𝗵𝘂𝗿𝘀𝗱𝗮𝘆 (25th of September) for a deep dive into Evaluation Driven Development for Agentic AI Systems: https://t.co/u25rIaHbU4
#LLM #AI #MachineLearning
Who is a Full-stack AI Engineer?
Production-grade AI systems demand a deep understanding of how LLMs are engineered, deployed, and optimized.
Here are the 8 pillars that define serious LLM development:
A breakdown of 𝗗𝗮𝘁𝗮 𝗣𝗶𝗽𝗲𝗹𝗶𝗻𝗲𝘀 𝗶𝗻 𝗠𝗮𝗰𝗵𝗶𝗻𝗲 𝗟𝗲𝗮𝗿𝗻𝗶𝗻𝗴 𝗦𝘆𝘀𝘁𝗲𝗺𝘀 👇 And yes, it can also be used for LLM based systems!
It is critical to ensure Data Quality and Integrity upstream of ML Training and Inference Pipelines, trying to do that in the downstream systems will cause unavoidable failure when working at scale.
There is a ton of work to be done on the Data Lake or LakeHouse layer. 𝗦𝗲𝗲 𝘁𝗵𝗲 𝗲𝘅𝗮𝗺𝗽𝗹𝗲 𝗮𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲 𝗯𝗲𝗹𝗼𝘄.
𝘌𝘹𝘢𝘮𝘱𝘭𝘦 𝘢𝘳𝘤𝘩𝘪𝘵𝘦𝘤𝘵𝘶𝘳𝘦 𝘧𝘰𝘳 𝘢 𝘱𝘳𝘰𝘥𝘶𝘤𝘵𝘪𝘰𝘯 𝘨𝘳𝘢𝘥𝘦 𝘦𝘯𝘥-𝘵𝘰-𝘦𝘯𝘥 𝘥𝘢𝘵𝘢 𝘧𝘭𝘰𝘸:
𝟭: Schema changes are implemented in version control, once approved - they are pushed to the Applications generating the Data, Databases holding the Data and a central Data Contract Registry.
Applications push generated Data to Kafka Topics:
𝟮: Events emitted directly by the Application Services.
👉 This also includes IoT Fleets and Website Activity Tracking.
𝟮.𝟭: Raw Data Topics for CDC streams.
𝟯: A Flink Application(s) consumes Data from Raw Data streams and validates it against schemas in the Contract Registry.
𝟰: Data that does not meet the contract is pushed to Dead Letter Topic.
𝟱: Data that meets the contract is pushed to Validated Data Topic.
𝟲: Data from the Validated Data Topic is pushed to object storage for additional Validation.
𝟳: On a schedule Data in the Object Storage is validated against additional SLAs in Data Contracts and is pushed to the Data Warehouse to be Transformed and Modeled for Analytical purposes.
𝟴: Modeled and Curated data is pushed to the Feature Store System for further Feature Engineering.
𝟴.𝟭: Real Time Features are ingested into the Feature Store directly from Validated Data Topic (5).
👉 Ensuring Data Quality here is complicated since checks against SLAs is hard to perform.
𝟵: High Quality Data is used in Machine Learning Training Pipelines.
𝟭𝟬: The same Data is used for Feature Serving in Inference.
Note: ML Systems are plagued by other Data related issues like Data and Concept Drifts. These are silent failures and while they can be monitored, we can’t include it in the Data Contract.
Let me know your thoughts! 👇
#MachineLearning #DataEngineering #AI
A graph-powered all-in-one RAG system!
RAG-Anything is a graph-driven, all-in-one multimodal document processing RAG system built on LightRAG.
It supports all content modalities within a single integrated framework.
100% open-source.
𝗗𝗮𝘁𝗮 𝗟𝗮𝗸𝗲 𝘃𝘀 𝗗𝗮𝘁𝗮 𝗪𝗮𝗿𝗲𝗵𝗼𝘂𝘀𝗲 𝘃𝘀 𝗗𝗮𝘁𝗮 𝗟𝗮𝗸𝗲𝗵𝗼𝘂𝘀𝗲 𝘃𝘀 𝗗𝗮𝘁𝗮 𝗠𝗲𝘀𝗵
In the evolving world of data management, understanding the key differences between these architectures is critical
Here’s a brief overview of each:
☑ Data Lake
- Description: A central repository that stores raw, unstructured, and structured data at any scale.
- Pros: Highly scalable, cost-effective for storing vast amounts of data, flexible for data scientists and engineers.
- Cons: Data governance can be challenging, and querying large datasets can be inefficient without proper management.
☑ Data Warehouse
- Description: A structured storage system optimized for querying and reporting, typically for business intelligence (BI) purposes.
- Pros: Optimized for performance, ideal for complex queries, and provides strong data governance.
- Cons: Less flexible for unstructured data, higher costs, and slower adaptation to real-time data.
☑ Data Lakehouse
- Description: A hybrid approach that combines the benefits of a data lake and a data warehouse, allowing both raw and structured data in one platform.
- Pros: Flexibility of data lakes with the performance of data warehouses, simplified architecture, and supports advanced analytics.
- Cons: Emerging technology with fewer mature solutions compared to standalone systems.
☑ Data Mesh
- Description: A decentralized approach to data architecture where data is treated as a product, managed by domain-specific teams.
- Pros: Promotes scalability and ownership, supports cross-functional collaboration, and enhances agility.
- Cons: Requires a cultural shift, complexity in governance
Each approach has its unique benefits and trade-offs, so the best choice depends on your organization’s size and use cases.