DEV Community

Zaima Sohail
Zaima Sohail

Posted on Originally published at Medium on

From Electrical Engineering to AI Engineer: My Roadmap

How I went from circuits and microprocessors to machine learning, LLMs and RAG, and the path I’d follow if I started again.

A few years ago, if someone had told me I’d be building RAG pipelines and working with large language models, I wouldn’t have believed them. I was an Electrical Engineering student. My days were circuit diagrams, signals, control systems and far too many MATLAB assignments, and AI wasn’t really on my radar as a career.

Today I write Python for a living, I’m doing my MS in Data Science, and most of my free time goes into building AI projects. I don’t have a CS degree. What I had was curiosity and a lot of trial and error.

This post is about how that happened: the projects that pushed me, the mistakes I made, and the roadmap I’d follow if I were starting from scratch today. If you’re coming from EE or any other non-CS field and wondering whether you can make the switch, I hope it helps.

Starting with Electrical Engineering

I did my bachelor’s in Electrical Engineering at UET Lahore from 2021 to 2025. Most of it was what you’d expect: electric circuits, electronics, digital systems, signals and systems, microprocessors, control systems, power and computer architecture. But looking back, there was more computing in there than I gave it credit for. My very first semester had a course called Introduction to Computing and Data Science. Later came Programming Fundamentals, Data Structures and Algorithms, Discrete Mathematics, Digital Signal Processing and Computer Networks, and in my last two years I took Introduction to Machine Learning and Deep Learning as part of the degree.

At the time I didn’t see any of this as an AI path. They were just courses to get through. But they gave me two things I use every day. The first is the maths: linear algebra, multivariable calculus, probability, and the convolution from signals and DSP were already familiar when I met them again in machine learning. The second is a habit of breaking a messy problem into smaller parts and continuing to experiment when things don’t work. That habit is very useful when a model refuses to train properly at 2 a.m.

The project that changed my direction

For my final-year project I built a Vision Transformer accelerator using RISC-V. The idea was to design hardware that speeds up the attention computations inside a Vision Transformer, written in Verilog with fixed-point arithmetic and connected to a RISC-V processor.

To build hardware for attention, I had to understand attention properly: every matrix multiplication, every intermediate value, where each number comes from and where it goes. You can’t hide behind a library call when you’re the one designing the circuit that does the work.

Somewhere in that project I realised I was more interested in the model than the hardware. Hardware and AI turned out to be much closer than I’d assumed, and I started wondering what it would be like to work on the software side of AI full time. That’s really where my transition started.

Getting serious about Python

My degree gave me a start with programming. Programming Fundamentals went well enough that I later worked as a TA for it, and Data Structures and Algorithms showed me how much I still had to learn. But Python was where things really opened up. I went through the basics again properly: functions, data structures, OOP, file and exception handling, and working with libraries and APIs. Then NumPy, Pandas and Matplotlib.

It was slow at first. I’d lose an hour to a bug that turned out to be one wrong index. But at some point I stopped writing code just to finish assignments and started using it to analyse data and automate boring tasks, and that’s when it became fun.

You don’t need to know every corner of Python before moving into AI. You do need to be able to write code on your own, read error messages, and understand roughly what your libraries are doing. Copying code is easy. Knowing why it works is the part that actually matters.

Learning machine learning the slow way

My first proper introduction to machine learning was a course in the third year of my degree, and honestly it was overwhelming. Supervised, unsupervised, overfitting, feature engineering, hyperparameters, all at once, and one semester isn’t much time to take it all in. Every tutorial I found afterwards made it look easier than it was.

So I went slowly. I revisited linear algebra, probability and statistics (my EE background helped a lot here), then learned the classical algorithms in scikit-learn: linear and logistic regression, decision trees, random forests, SVMs and KNN. The biggest jump came when I started using real datasets, with missing values, noise, and models that looked great in training and fell apart on test data.

My early projects were things like MNIST digit recognition, time-series forecasting, forecasting on PSX stock data, and a water quality assessment project with explainable ML. None of them were perfect, but each one taught me something no tutorial had. Mainly, that machine learning is not about calling .fit(). Most of the work is understanding the data, evaluating properly and figuring out why the model is doing what it’s doing.

Deep learning and PyTorch

I took Deep Learning in my final semester, alongside my final-year project, and kept going on my own after that: CNNs, RNNs, LSTMs and transformers, mostly in PyTorch. Tensor shapes confused me for a long time. One wrong dimension and the whole thing breaks, usually with an error message longer than the code. It got better with practice, and my final-year project helped because I already knew how attention worked underneath.

One project from this stage that I’m happy with is my AI Health Assistant. You enter your symptoms and it predicts a likely disease, along with the type of doctor to see and a risk level, using a hybrid CNN and Vision Transformer model. The code is on GitHub.

Discovering LLMs and RAG

Natural language processing pulled me in next, and that led to large language models. What surprised me was how different building with LLMs is from training a classifier. I had to learn prompting, embeddings, vector databases, retrieval with FAISS and BM25, LangChain, and later agentic and multi-agent setups.

Retrieval-Augmented Generation caught my attention most. Instead of relying only on what the model learned in training, you retrieve relevant documents first and let the model answer from them. Think of a chatbot that answers from your university’s course material instead of guessing from general knowledge.

It sounds simple, but it raises hard questions very quickly. How do you make sure you retrieve the right chunks? What happens when retrieval returns something irrelevant? How do you reduce hallucinations, and how do you even measure whether the system is good? That’s when I understood that an AI application is a lot more than an API call.

What my Odoo job taught me

Alongside all this, I work as a Python and Odoo developer at ESSL Lab, KICS, UET Lahore. It might look unrelated to AI, but it has made me a much more practical developer.

I work with Python, PostgreSQL, business logic, access controls and reports on a system that real people use every day. When something breaks, someone notices. A small change in one place can cause a problem somewhere else, and “it works on my machine” doesn’t count as done.

That’s the part of AI engineering a lot of courses skip. A good model is only one piece. You also have to integrate it into an application, handle errors, deal with messy data and keep the code maintainable. My AI Resume Analyzer is where I tried to put this into practice. It parses a CV, scores it against a job description using an LLM, and points out missing keywords and problems. It has user login and it’s live on Streamlit Community Cloud (code on GitHub).

Why I did an MS

Self-learning helped me figure out what I liked, but I wanted a stronger theoretical base and a proper introduction to research, so I started an MS in Data Science at UET Lahore.

The biggest change in how I think has been around evaluation. It’s easy to say a model performs well and much harder to show it. Is the comparison fair? Are these the right metrics? Does the new approach actually beat the baseline, or does it just sound more impressive? With LLMs this matters even more, because an answer can sound completely convincing and still be wrong.

The roadmap I’d follow if I started again

If you’re coming from EE, mechanical, physics, maths or any other non-CS background, this is roughly the path I’d suggest. The timelines are rough and depend on how much time you have.

Phase 1: Python (4–6 weeks)

Fundamentals, OOP and file handling, then NumPy, Pandas and plotting. Build a small data analysis or Excel automation project.

Phase 2: Machine learning (6–8 weeks)

Supervised and unsupervised learning, feature engineering, evaluation metrics and scikit-learn. Build a classification or regression project on a real, messy dataset.

Phase 3: Deep learning (6–8 weeks)

Neural networks, backpropagation, CNNs, transformers and PyTorch. Build an image or text classifier.

Phase 4: LLM applications (6–8 weeks)

Embeddings, prompting, vector databases, RAG, model APIs and LangChain. Build a chatbot that answers questions from your own documents and shows its sources.

Phase 5: Complete applications (ongoing)

FastAPI, SQL, Git, testing, Docker, deployment and basic cloud. Build something end to end that another person can actually use.

Whatever phase you’re in, spend less time watching tutorials and more time building. You learn the most when your own project breaks and you have to fix it.

Mistakes I made

Trying to learn everything at once. At one point I wanted ML, deep learning, NLP, computer vision and LLMs all together. I ended up knowing a little about everything and not enough to build anything complete. Picking one area and going deep worked much better.

Too many tutorials. Watching someone build a project feels like learning. Then you open a blank editor and realise you can’t do it yourself.

Comparing myself with CS graduates. They often have stronger foundations in algorithms, databases and software engineering, and for a while that bothered me. But my background gave me strengths too, in maths, hardware and thinking about whole systems. Different paths give you different advantages.

Thinking a working notebook means a finished project. A notebook is a starting point. A real application also needs data validation, an API, error handling, security, a usable interface and evaluation. I’m still learning this one.

What’s next

I don’t think of my transition as finished. Right now I’m focusing on production-ready LLM and RAG applications, agentic AI, evaluation and benchmarking, deployment, and backend engineering for AI systems. I’d rather build things that solve a real problem than chase whatever is trending this month.

If you’re thinking about switching

My path wasn’t planned. There were confusing concepts, failed experiments and plenty of days when I wondered if I was learning fast enough. There were also good moments: the first model that gave sensible predictions, the first project I built without a tutorial, the first research paper I actually understood.

If you’re moving into AI from another field, start with what you already know, fill in the gaps one at a time, and build projects that are slightly too hard for you. You don’t need to feel ready first. I didn’t, and I still don’t, but I’m building anyway.

Thanks for reading. I write about what I’m learning in AI, LLMs, RAG and Python while building real projects. If you’ve moved into AI from another field, I’d love to hear what the hardest part was for you.

Connect with me on LinkedIn and GitHub

Top comments (0)