Using Claude to Create an App in a Tech I Know Nothing About

The latest and greatest chatbot (or Large Language Model if you want to use the proper term) is Claude 3.5 Sonnet at the moment. No doubt it'll be something even better next month.

For me, the process of having an AI assistant while writing code moved from 'convenient' to 'essential' very quickly. I'm not talking about a dedicated coding copilot. I'm just talking about using a LLM (Claude in this case) via their main website to ask advice and fix coding issues.

Claude 3.5 Sonnet was released less than a month ago, and what I describe in this post really wasn't possible before that. Coding assistants existed, of course, but I wouldn't trust them particularly; it's still very early days for the tech. So if you've previously looked at using LLMs for coding and decided they weren't that good, it's time for another look. And they're only going to get better.

My productivity is at least 10x what it would otherwise be, if I had to manually trawl Stack Overflow or endlessly look up documentation for code libraries. It only takes a basic awareness of prompt engineering to obtain what literally feels like a superpower. This is the future. Any companies blocking the internal use of LLMs are missing out on the biggest leap forward since the internet.

Not only can it make you more productive with technologies and platforms you're good at, it also throws open the doors of possibility to using unfamiliar tech. To test this I decided to create an app using a tech I know absolutely nothing about - Streamlit.

I decided (after getting Claude's suggestions) to make a simple sentiment analyser, incorporating a pre-trained AI model to perform a task. Something where the user can put in any free-form natural language text, and it will analyse the sentiment, classifying what they wrote as either positive, negative or neutral. Where would you even begin, trying to create that without AI? A course in Streamlit for Beginners, probably.

It took me less than two hours, thanks to my trusty AI copilot.

Here's what the app looks like:

 


 

As you can see, it correctly classifies "Today is going to be glorious!" as positive, "Too much social media is unhealthy" as negative and "The bike is green." as neutral.

 

The Process

It took just a few rounds of conversation with Claude to produce the final result.

After my lengthy description of what I wanted, Claude suggested creating a Streamlit app and generated a first attempt at the code. (I already knew how to set up a virtual environment and install Python libraries; the process would have taken longer if I'd needed walking through that.)

The first version had a problem with conflicting libraries - the installed version of Numpy needed to be changed. But I just pasted each error message back into Claude, who rapidly solved it and, where necessary, rewrote the code.

The next version worked but the outputs were either completely positive or completely negative, with no in between. So we switched to a different pre-trained AI model, which then worked.

Just two hours to produce a basic working app using a trained neural network for a natural language understanding task, all in a tech (Streamlit) I still know nothing about!


Future Thoughts

The only time I managed to get an incorrect result was using British slang, which the pre-trained model was evidently not trained on. "My sofa is the bee's knees" was classified as neutral and "My sofa is the dog's bollocks" was categorised as negative, when both should have been positive.

If this mattered, the solution would be to fine-tune the model on the extra vocabulary, although producing a suitable dataset might be a time-consuming task. (Much of real-world machine learning is about data preparation.)

The broader takeaway is just how easy it was to create a working app using an unfamiliar tech, by using a state-of-the-art LLM as an assistant. I'll create other, more advanced projects in this way going forward, alongside the general tech skills I'm learning.

I would love to feel that I can work one-on-one with anyone to empower them with cutting edge AI tools and help increase their productivity and ease any pain points. If anyone reading this wants a free one-on-one session, let me know!



Comments