Santiago Profile picture
Computer scientist. I teach hard-core AI/ML Engineering at https://t.co/THCAAZcBMu. YouTube: https://t.co/pROi08OZYJ
95 subscribers
May 19 4 tweets 3 min read
I added a Knowledge Graph to Cursor using MCP.

You gotta see this working!

Knowledge graphs are a game-changer for AI Agents, and this is one example of how you can take advantage of them.

How this works:

1. Cursor connects to Graphiti's MCP Server. Graphiti is a very popular open-source Knowledge Graph library for AI agents.

2. Graphiti connects to Neo4j running locally.

Now, every time I interact with Cursor, the information is synthesized and stored in the knowledge graph. In short, Cursor now "remembers" everything about our project.

Huge!

Here is the video I recorded. To get this working on your computer, follow the instructions on this link:

github.com/getzep/graphit…

Something super cool about using Graphiti's MCP server:

You can use one model to develop the requirements and a completely different model to implement the code. This is a huge plus because you could use the stronger model at each stage.

Also, Graphiti supports custom entities, which you can use when running the MCP server.

You can use these custom entities to structure and recall domain-specific information, which will tenfold the accuracy of your results.

Here is an example of what these look like:

github.com/getzep/graphit…
Apr 30 11 tweets 3 min read
Improve your LLM-based applications by 200%:

Build an LLM-as-a-Judge evaluator and integrate it with your system.

This sounds harder than it is.

Here is how to do it and the things you need to keep in mind:

1/11 Image (LLM-as-a-judge is one of the topics I teach in my cohort. The next iteration starts next week. You can join at .)

LLM-as-a-Judge is a technique that uses an LLM to evaluate the quality of the outputs from your application.

2/11ml.school
Apr 18 8 tweets 3 min read
Falling off ladders to claim insurance checks is a multi-million-dollar fraud business in the US.

People bury insurance companies in paperwork to steal from them.

Enter RAG.

Here is how RAG is becoming the cheaters' worst nightmare (and how you can do the same):

1/8 Image An insurance claim can easily have 20,000 pages, and somebody must read them all!

I work with @EyeLevel, and we built a fraud detection system using their GroundX platform.

Best RAG use case I've seen—and you can use GroundX to build your own in any vertical.

2/8
Mar 7 4 tweets 2 min read
Here is an explanation of what MCP is, how it works, and why I think it's awesome.

I will also show you the MCP server I'm building.

This is good stuff. For those who like YouTube better:



By the way, I won't like you anymore if you don't subscribe to my channel.
Jan 16 11 tweets 1 min read
AWS is irrefutable proof that the right software with a great backend can succeed despite horrible UI/UX. Craigslist: “hold my beer”
Nov 12, 2024 4 tweets 2 min read
This is worth 1,000+ hours of engineering work every year:

1. Reproducing a bug
2. Getting detailed debug data
3. Writing how to reproduce it
4. Putting it all together in a good bug report

This tool can do all of this and cut the time it takes to fix the bug by 70%+: makes the reporting and fixing process really fast!

Click once, and engineers get:

• Console logs
• Network requests
• Timing waterfall
• Repro steps
• Session & user details
• Device & OS
• Backend logs

Check the attached video. Jam.dev
Oct 1, 2024 13 tweets 5 min read
My new soon-to-be Linux laptop right before I start assembling it. Image RAM and SSD are now installed. Took me 1 minute and I didn’t even read the manual. Image
Sep 16, 2024 9 tweets 3 min read
How can you build a good understanding of math for machine learning?

Here is a complete roadmap for you.

In essence, three fields make this up:

• Calculus
• Linear algebra
• Probability theory

Let's take a quick look at them! Image This thread is courtesy of @TivadarDanka.

3 years ago, he started writing a book about the mathematics of Machine Learning.

It's the best book you'll ever read:



Nobody explains complex ideas like he does.tivadardanka.com/books/mathemat…
Aug 12, 2024 18 tweets 6 min read
The single most undervalued fact of linear algebra:

Matrices are graphs, and graphs are matrices.

Encoding matrices as graphs is a cheat code, making complex behavior simple to study.

Let me show you how! Image By the way, this thread is courtesy of @TivadarDanka. He allowed me to republish it.

3 years ago, he started writing a book about the mathematics of Machine Learning.

It's the best book you'll ever read:



Nobody explains complex ideas like he does.tivadardanka.com/books/mathemat…
Jul 12, 2024 10 tweets 4 min read
A common fallacy:

If it's raining, the sidewalk is wet. But if the sidewalk is wet, is it raining?

Reversing the implication is called "affirming the consequent." We usually fall for this.

But surprisingly, it's not entirely wrong!

Let's explain it using Bayes Theorem:

1/10 Image This explanation is courtesy of @TivadarDanka. He allowed me to republish it.

He is writing a book about the mathematics of Machine Learning. It's the best book I've read:



Nobody explains complex ideas like he does.

2/10tivadardanka.com/books/mathemat…
Jun 12, 2024 6 tweets 2 min read
Some of the skills you need to start building AI applications:

• Python and SQL
• Transformer and diffusion models
• LLMs and fine-tuning
• Retrieval Augmented Generation
• Vector databases

Here is one of the most comprehensive programs that you'll find online: "Generative AI for Software Developers" is a 4-month online course.

It's a 5 to 10-hour weekly commitment, but you can dedicate as much time as you want to finish early.

Here is the link to the program:

I also have a PDF with the syllabus:bit.ly/4aNOJdy
Jun 10, 2024 15 tweets 5 min read
There's a stunning, simple explanation behind matrix multiplication.

This is the first time this clicked on my brain, and it will be the best thing you read all week.

Here is a breakdown of the most crucial idea behind modern machine learning:

1/15 Image This explanation is courtesy of @TivadarDanka. He allowed me to republish it

3 years ago, he started writing a book about the mathematics of Machine Learning.

It's the best book you'll ever read:



Nobody explains complex ideas like he does.

2/15tivadardanka.com/books/mathemat…
May 28, 2024 4 tweets 1 min read
This assistant has 169 lines of code:

• Gemini Flash
• OpenAI Whisper
• OpenAI TTS API
• OpenCV

GPT-4o is slower than Flash, more expensive, chatty, and very stubborn (it doesn't like to stick to my prompts).

Next week, I'll post a step-by-step video on how to build this. The first request takes longer (warming up), but things work faster from that point.

Few opportunities to improve this:

1. Stream answers from the model (instead of waiting for the full answer.)

2. Add the ability to interrupt the assistant.

3. Whisper running on GPU
May 25, 2024 4 tweets 2 min read
I’m so sorry about anyone who bought the rabbit r1.

It’s not just that the product is non-functional (as we learned from all the reviews), the real problem is that the whole thing seems to be a lie.

None of what they pitched exists or functions the way they said. Image They sold the world on a Large Action Model (LAM), an intelligent AI model that would understand applications and execute the actions requested by the user.

In reality, they are using Playwright, a web automation tool.

No AI. Just dumb, click-around, hard-coded scripts. Image
Mar 31, 2024 10 tweets 4 min read
What a week, huh?

1. Mojo 🔥 went open-source
2. Claude 3 beats GPT-4
3. $100B supercomputer from MSFT and OpenAI
4. Andrew Ng and Harrison Chase discussed AI Agents
5. Karpathy talked about the future of AI
...

And more.

Here is everything that will keep you up at night: Mojo 🔥, the programming language that turns Python into a beast, went open-source.

This is a huge step and great news for the Python and AI communities!

With Mojo 🔥 you can write Python code or scale all the way down to metal code. It's fast!

modular.com/blog/the-next-…
Mar 13, 2024 14 tweets 4 min read
The batch size is one of the most important parameters when training neural networks.

Here is everything you need to know about the batch size:

1 of 14 Image I trained two neural networks.

Same architecture, loss, optimizer, learning rate, momentum, epochs, and training data. Almost everything is the same.

Here is a plot of their losses.

Can you guess what the only difference is?

2 of 14 Image
Jan 5, 2024 5 tweets 2 min read
I had an amazing machine learning professor.

The first thing I learned from him was how to interpret learning curves. (Probably one of the best skills I built and refined over the years.)

Let me show you 4 pictures and you'll see how this process flows:

1/5 Image I trained a neural network. A simple one.

I plotted the model's training loss. As you can see, it's too high.

This network is underfitting. It's not learning.

I need to make the model larger.

2/5 Image
Dec 21, 2023 4 tweets 2 min read
AI will be one of the most crucial skills for the next 20 years.

If I were starting today, I'd learn these:

• Python
• LLMs
• Retrieval Augmented Generation (RAG)

Here are 40+ free lessons and practical projects on building advanced RAG applications for production:

1/4
This is one of the most comprehensive courses you'll find. It covers all of LangChain and LlamaIndex.

And it's 100% FREE!

@activeloopai, @towards_AI, and @intel Disruptor collaborated with @llama_index to develop it.

Here is the link:

2/4learn.activeloop.ai/courses/rag
Oct 25, 2023 8 tweets 4 min read
The best real-life Machine Learning program out there:

"I have seen hundreds of courses; this is the best material and depth of knowledge I've seen."

That's what a professional Software Engineer finishing my program said during class. This is the real deal.

I teach a hard-core live class. It's the best program to learn about building production Machine Learning systems.

But it's not a $9.99 online course. It's not about videos or a bunch of tutorials you can read.

This program is different.

It's 14 hours of live sessions where you interact with me, like in any other classroom. It's tough, with 30 quizzes and 30 coding assignments.

Online courses can't compete with that.

I'll teach you pragmatic Machine Learning for Engineers. This is the type of knowledge every company wants to have.

The program's next iteration (Cohort #8) starts on November 6th. The following (Cohort #9) on December 4th.

It will be different from any other class you've ever taken. It will be tough. It will be fun. It's the closest thing to sitting in a classroom.

And for the first time, the next iteration includes an additional 9 hours of pre-recorded materials to help you as much as possible!

You'll learn about Machine Learning in the real world. You'll learn to train, tune, evaluate, register, deploy, and monitor models. You'll learn how to build a system that continually learns and how to test it in production.

You'll get unlimited access to me and the entire community. I'll help you through the course, answer your questions, and help with your code.

You get lifetime access to all past and future sessions. You get access to every course I've created for free. You get access to recordings, job offers, and many people doing the job you want to do.

No monthly payments. Ever.

The link to join is in the attached image and in the following tweet.
Image The link to join the program:
The cost to join is $385.

November and December are the last two iterations remaining at that price. The cost will go up starting in January 2024.

Today, there are around 800 professionals in the community.ml.school
Oct 2, 2023 8 tweets 3 min read
AI is changing how we build software.

A few weeks ago, I talked about using AI for code reviews. Many dismissed the idea, saying AI can't help beyond trivial suggestions.

You are wrong.

Here are a few examples of what you can do with @CodiumAI's open-source pull request agent: Image Here, the agent generated the description of a pull request.

It looks at every commit and file involved and summarizes what's happening automatically.

You can do this by using the "/describe" command. Image
Sep 21, 2023 5 tweets 2 min read
There is a considerable risk to start building with Large Language Models.

Prompt lock-in is a big issue, and I'm afraid many people will find out about it the hard way.

There's no cross-compatibility for many of your prompts. If you change your model, your prompts will stop working.

Here are two examples:

First, an application where an LLM generates marketing copy for a site. Here, you expect open-ended responses. A prompt like that will work across different models with little or no modifications. Use cases like this have high prompt portability.

Second, an LLM that interprets and classifies a customer request. This use case requires terse and structured responses. These prompts are model-dependent and have low portability.

Here is what makes matters worse:

The more complex the responses, the more time you need writing prompts and the less portable they are. In other words, the more you invest, the more you'll lock your implementation to one specific model.

What's the solution?

First, be careful how much you invest in writing prompts for a model that could stop working any day. Having to migrate to a different model will come at a steep cost.

Second, it's too early to understand how these models will evolve. Don't outsource too much to a Large Language Model. The more you do, the more significant the risk.

If you are using an LLM as part of a product, how are you protecting against this? The biggest issue is not whether the model has the capacity to answer a prompt.

The problem is about the variability of that answer. For example, this is an issue when you require a strictly formatted response.

You can solve a problem using GPT-3.5, GPT-4, and Llama 2. But, in many cases, you'll need different prompts for every one of these models.

That's the issue.