How To Build An AI Coding Assistant

Опубликовано: 12 Октябрь 2024
на канале: Siddhant Dubey
3,793
292

I “built” an AI Coding Assistant.

Copilot is great, ChatGPT is great, but their context length is an issue. They can’t take all the code in your project into their “memory”.

To fix this, we give them external memory in the form of a vector database, which is just all the code you want help on turned into lists of numbers.

Then, whenever you ask the assistant a question, it’ll look up what it needs to know from the database and then use it to answer your questions.

Before you turn the code into vectors, you need to figure out how to break the code down. For an essay you might break it down into paragraphs, for code you would break it down function by function. Then, you use an embedding model to turn this into a vector to put in the database.

Then you hook up your large language model of choice, let it look stuff up in your database, and you’re done!

This isn’t great performance wise though, especially when it comes to speed, and programs like Cody and Cursor do this multi-file support better. The code is on my GitHub.

Current Sub Count: 17,047
Business Email: [email protected]

Patreon:   / siddhantdubey  
🤖 Join my discord server:   / discord  
📸 Instagram -   / sid12.dubey  
🐦 Twitter -   / sidcodes  
💻 GitHub - https://github.com/siddhantdubey/
🎵 Follow my TikTok:   / sidcodes  

Music In This Video:
Epidemic Sound: https://share.epidemicsound.com/02ed67
(I do get benefits from the above link)

WHO AM I?
I'm a third year at Georgia Tech majoring in Computer Science. On this channel, I make videos related to machine learning and programming, lifestyle vlogs, productivity tip videos, and more! If you're interested in that, be sure to hit the subscribe button and leave a like on this video! Subscribe here: http://youtube.com/c/SiddhantDubey/?s...