Joshua Bemendorfer talks through his project: building a note-taking app.
Speaker 0: Today, I would like to show you how to supercharge AI batch processing using Directus MCP with a self learning note taking workflow. Batch processing is really effective for, for situations where you need raw speed, but it kinda breaks down when you need to make creative decisions on individual items and on the batch as a whole. You can't really do that without a human element. AI models, I found, are great for those sorts of tasks, but they break down when you give them a whole bunch of data. And they also struggle with finding the right information to pull in to make those creative decisions.
So the solution I found is to teach AI to take notes. By implementing a workflow that lets Directus MCP take notes directly on whatever it's working on, we gain the ability to do things like long running task tracking because the model can pick up where it left off and and, start fresh with a new context window. And we also get things like self improving database access. You take a note on all the different things that you ran into difficulty with and what you did to solve them and how it worked out. And it speeds up future runs because it can read that note and go, okay.
So don't do this. Do this, and I'll be able to just continue with the task I was working on. And then by letting it take notes, we can consolidate a whole bunch of data that was stored in the database. Say, Say, for example, you wanted to pull out all of the aliases for your articles that are related to rabbits and you also want the ID for each one. Well, you can just dump that in a note and analyze it in future runs.
So in our case, Directus is the knowledge backbone. Every note is just a key value pair. I'll go ahead and show you the notes table here. It's a very simple setup. We have a key, which is just a string, and this is what the AI model uses to kind of categorize what the different notes are about.
And we have the value, and that's just a big markdown, field. It's a very simple setup, but it's surprisingly powerful. By using semantic keys and explicit instructions on how to record and review notes, we give the AI models a very quick and effective way to find the context they need. So this database has a problem. We have a whole bunch of articles.
We have a 124 articles. The titles don't really make any sense. Oh, the bodies are in Latin. And I I can't work with this. So I've created a prompt for Claude to read the article titles and come up with a concept proposal for each one.
What could this article actually be about? So let's look at the system prompt here. You can see that there's two things that it's informing the AI model about. That there's an AI notes table in the rough structure of that table and that it needs to read and record its database insights, especially how it solved problems it ran into and just update that note on every run. This gives it the self learning ability we were talking about earlier.
It's able to figure out what it ran into last time and fix it on the next run. Now back to the task. I've told the AI model it's a skilled content analyst and writer. We have a huge collection of articles. All the bodies are full of nonsense, all that.
Alright. So its job is to record the concepts that it comes up with in an article concepts note. It's not sure what to do with an article based on the title. Be creative. Find a wacky concept.
Then we have some very specific instructions. We say always read the template and template article concepts, this is a note, to determine how to structure your output. Always create a new article concepts note for each run. Always give it the exact name. Always process 30 articles.
Always review the last note you created before starting to make sure you don't duplicate any work. This template lets us make sure that we get consistent output on every run. Alright. Let's go ahead and run this a few times and see what its output looks like. I turn on auto refresh, and then I'm gonna go into Claude, add a prompt from Directus, and examine articles and propose concepts.
If you want to know how to use this feature, go ahead and take a look at the Directus MCP documentation, and then we're just gonna send it. Now one of the fun things you can do with read and write access direct to Directus is if the model makes a mistake, you can ask it to update the prompt to fix its mistake in future runs. Article concepts. It has identified directly that just about every article appears to be lorem ipsum gibberish and occasional test content. Alright.
So came up with a bunch of different articles on a bunch of different ideas. In a bit, we're gonna use this to actually write all these different article concepts. But for now, I just wanna keep going through the batch process to show you how it's able to pick up where it left off and continue. On this run, if you notice, it actually picked up that it needed to look up the translations and didn't have to figure that out from the schema this time. Alright.
It is a new day. My cloud usage limits have reset, and we are ready to continue with step two, which is generating the articles based on the concepts that we've put together. All of the, article concepts have now been saved in these, concept notes. They take the article title. They try to figure out what on earth, the article should be about and propose a concept.
So now we have the next step of the process, which is to generate a actual article for each of the articles we generate concepts on in both English and German. And we're gonna go in batches of 10 and see how well that works. We'll take this prompt and it should automatically read over all of our article concept notes and start filling in articles for those. Let's go. So we're going to use the turn concepts into full fledged articles prompt.
That's going to go and read through all of our article concept notes and start filling in those articles, and I'll show you those articles as it writes them. I have no idea if these articles are going to make any sense. This is going to be fun. I'm having fun reading through these articles. I have no idea how helpful any of this is, but it at least sounds very convincing.
Now, the key advantage to this approach is that if we were generating concepts and writing articles at the same time, we'd have to use much smaller batches. But because we split the process into two steps, we've saved a ton of context window, and we're able to work in larger batches. And as a bonus, we can do multiple things with those article summaries, while we're working on generating those articles from those summaries. Now, this isn't the most efficient workflow for generating articles. There's way better workflows for that.
We're just demonstrating this concept. But a nice thing about this approach is that you can perform multiple tasks at the same time. For example, while we were working on these articles, we could also be working on something completely different using the notes that we're generating the articles from. I have this prompt here, categorize article concepts, which will allow Claude to suggest an article taxonomy based on the summaries it's already generated. It'll just read all the article concept notes and create a new note suggesting that new taxonomy.
I like the way it describes these articles as a fascinating collection of technical and business focused article concepts with creative jargon filled titles that have been transformed into practical valuable content ideas. I'm not quite sure I'd be so positive about it, but it gets the idea across. Alright. Let's take a look at the categories that it generated and the opportunities that identified. So here's some content gaps, AI and ethics, sustainable technology operations, human centered digital transformation, all sorts of other different things.
And here are some of the categories that's come up with. System architecture, it's put a bunch of different articles in that category, Ecommerce, digital business, data management and analytics, user experience and interface design, business operations or business optimization management, automation and AI systems, project management and collaboration. So it's basically taken all of those articles that we put together and categorized them according to common themes in those articles. This could be really useful if you have an existing content collection that you're trying to build a new categorization system for. And what's great is you could just take this and create another prompt to actually apply that taxonomy to articles, and create categories and all sorts of different things for that in Directus.
So by the end of this run, here's what the AI model has built: concept proposals for every article in our database, full body content for many of those articles in English and German, a whole new content categorization system for the articles it wrote, progress logs so that it doesn't lose its place, and database access hints that documents how the challenges were solved so that on future runs, it could do even better. Instead of treating AI like a disposable worker or one that can infinitely stuff and stuff and stuff and work on something until it gets all confused, we're treating it like a teammate that tracks and follows up on what it's done across multiple days, multiple runs, starting with a clean slate on each task and only pulling in the information that it needs. We turned a human in the loop batch processing task into an AI creative workflow by splitting it into discrete steps and letting it kind of pick up where it left off. We gave the model a way to track progress. We built templates to make the results more consistent and reusable, and we recorded information about the database to help the AI model get smarter over time.
I've had a ton of fun nailing down this workflow and testing it on all sorts of tasks. For my work, we're actually using it to do things similar to this where we're analyzing a huge amount of content and trying to figure out how to organize and categorize and and do all sorts of things, and it's it's doing really well. The ability to take notes, record what it's done, and just kind of start over and create its own context has been incredibly helpful with turning a workflow that works really well for one or two articles into something that works well across thousands. So thank you for your time. I really look forward to seeing what everyone does with Directus and Directus MCP going forward, especially as Directus MCP evolves, AI models get more capable, and just the overall core gets stronger.
The future is gonna be fun.