- Nexan Insights
- Posts
- The Epic Story of Language Models, Code Generation, and Tool Use
The Epic Story of Language Models, Code Generation, and Tool Use
Like MS Paint for the Mind

Imagine you're trying to cook dinner, but instead of using pots, pans, and your stove, you're using AI-powered robots that interpret every ingredient, decide if that onion really belongs in the stir fry, and adjust your oven temperature based on a thousand other people's preferences. Yeah, that's kind of what modern language models are doing. They aren't just giving you an ingredient list; they're practically cooking the meal for you—sometimes well, sometimes... a little weird. Welcome to the realm of tool use in language models, where the spaghetti is code, and the sauce? Well, it's probably generated on the fly.
Potential Productivity and Strategic Choices in AI Tool Use
1. Tool Use—The Fancy AI Spatula
Let’s break it down. When we talk about tool use in AI, we're really talking about how large language models (LLMs) like GPT-4 can interact with other applications to accomplish tasks. Imagine an AI not only suggesting, "Here’s a great spaghetti recipe," but also turning on your stove, boiling the water, and timing it all perfectly. This is what code execution and API plugins are for. They’re basically AIs with arms, legs, and a can-do attitude.
There are three main flavors of this AI-tool-cook-off:
Code Generation and Execution: The AI can write and run code. You want a database? It'll not only sketch the table layout but also write the SQL to populate it. This is like giving a cooking robot the ability to not only chop onions but also to create a brand-new recipe on the spot, ensuring the onions caramelize just right. But sometimes it gets a little overenthusiastic and makes onion ice cream.
Third-Party Plugins: These are like APIs where you tell the model, "Go fetch information from this website, or send an email." The AI has instructions for this—like a detailed recipe card. It knows where the knives are and how sharp they need to be, but it’s limited to specific actions (probably safer, given the onion ice cream incident).
Native Plug-ins: This is where the AI has knowledge baked right into its brain. No need to go learn a new trick; it just knows how to perform certain tasks, like "search." Imagine the cooking robot already being an expert on pasta—you never have to explain al dente. It knows.
Investors would be interested in understanding how different types of AI tool use—like code execution, third-party plugins, and native plugins—impact enterprise productivity and scalability. Key metrics here include the potential reduction in operational costs, efficiency gains, and security risks associated with code execution.
Comparison of AI Tool Types: Reliability vs. Execution Speed
Table 1. The three main flavors of this AI-tool-cook-off - Code Generation, Third-part plugins, Native Plugins

2. How To Train Your AI—Like Your Very Own Kitchen Intern
Training an AI to use tools is not just about showing it the ropes; it's about making sure it doesn’t turn those ropes into spaghetti and serve them with marshmallow sauce. Let’s say OpenAI wants to train an LLM for enterprise usage—for automating, say, HR tasks. The AI can generate SQL code to query a giant employee database or execute actions across Slack, Gmail, and Salesforce. The real magic here is a combination of power and limitation—you give it the strength to lift 100 pounds, but make sure it doesn’t throw a bowling ball through your living room window.
It uses something like Pytorch or LangChain (think of these as different types of gym memberships for training). Some of these models, like Llama and Mistral, aren’t as famous as GPT, but they’re the steady and silent types—more like marathon runners rather than sprinters. They are taught to do just enough to avoid chaos.
But let’s be real—reliability is tricky here. OpenAI uses something like a supervising layer—basically a digital safety net to keep the AI from creating chaos by executing unreliable or malicious code. It's like having a cooking instructor overseeing a rogue sous-chef to make sure they don’t accidentally burn down the kitchen.
Optimizing AI Training: Comparing Memory Efficiency and Processing Speed in Pytorch and LangChain
Table 2. Memory usage reduction and processing speed for Pytorch and LangChain
A rudimentary yet educational way of how each model trains.

3. Plugins vs. Code Generation: When to Use What
Here’s the thing—there’s no one approach that fits every need. It’s like deciding between a regular knife and a Swiss army knife. The Swiss army knife can do everything—slice, dice, corkscrew a bottle—but sometimes, you just want a sharp, sturdy blade to fillet a fish.
If an enterprise wants reliability, it’ll probably use the Plugin API Spec Approach. This is like working with a pre-set recipe where the AI can only execute specific instructions. It’s much less likely to break anything, but it’s also less versatile. Need to query an SQL database? Sure thing, it'll pull the info for you, and that’s it.
On the other hand, if versatility is needed—like generating insights from large, messy datasets—you go for Code Generation. This is more like an AI that can freestyle, creating dishes you've never seen before. It’s powerful but carries risk; like when the AI decides your pasta dish would be "enhanced" by gummy bears.
And yes, all of this has risk attached. Executing arbitrary code can go really wrong, really quickly. Move the wrong dollar value in a financial database, and it’s like spilling boiling water all over your kitchen—someone's gonna get burned. So, OpenAI’s first versions may be limited, but they’re trying to find that sweet spot of "safe and still useful."
Emphasize the strategic choice between plugins and code generation for enterprises. Investors should understand the balance between versatility and control—code generation allows for complex operations but can be risky, while plugins provide constrained but reliable functionality.
Table 3. Versatality vs. Risk Level of plugins vs. code generation
Strategic Trade-Off: Code Generation’s Versatility vs. Plugin API’s Precision in AI Implementation

4. The Future—The Ultimate AI Chef
What’s the endgame here? Imagine an AI that not only knows how to use every tool but also decides which one to use at the perfect moment. We’re moving towards AI systems that are like the ultimate kitchen assistant—capable of adapting in real time, knowing when to defer to your judgment, and executing tasks without wrecking the kitchen.
But there's one final element we need to address—authorization and approval. Imagine a cooking robot that asks you if it's okay to chop the tomatoes before proceeding. This “approval mechanism” ensures that whatever the AI does next has a green light. This kind of governance is crucial for enterprise use, where the stakes are high.
Projected Financial Benefits of AI Tool Use with Authorization vs. Traditional Methods
The cooking robot of the future - authorization and approval over traditional methods
In the end, it's all about managing chaos in the kitchen. AI tools are powerful, versatile, and can help make a fantastic digital “meal” that’s tailored to individual preferences, whether that’s generating complex SQL databases or executing sales reports in a jiffy. But as with any power tool, they require practice, supervision, and sometimes an MS Paint-style simplicity to keep them on the straight and narrow.
Next time someone asks what AI tools and plugins are, just think of them as a quirky chef with a penchant for generating recipes out of thin air—sometimes genius, sometimes onion ice cream.
