The Power of Full Project Context using LLM's
Tags: devoxxgenie, claudeai, idea, intelli
Published: 2024-07-03 08:10:25

I've tried integrating RAG into the DevoxxGenie plugin, but why limit myself to just some parts found through similarity search when I can go all out?

> RAG is so June 2024 😂

Here's a mind-blowing secret: most of the latest features in the Devoxx Genie plugin were essentially 'developed' by the latest Claude 3.5 Sonnet large language model using the entire project code base as prompt context 🧠 🤯

It's like having an expert senior developer guiding the development process, suggesting 100% correct implementations for the following 

Devoxx Genie features:

- Allow a streaming response to be stopped

- Keep selected LLM provider after settings page

- Auto complete commands

- Add files based on filtered text

- Show file icons in list

- Show plugin version number in settings page with GitHub link

- Support for higher timeout values

- Show progress bar and token usage bar

I've rapidly stopped my OpenAI subscription and gave my credit card details to Anthropic...

## Full Project Context

> A Quantum Leap Beyond GitHub Copilot

Imagine having your entire project at your AI assistant's fingertips. That's now a reality with the latest version of the Devoxx Genie IDEA plugin together with cloud based models like Claude Sonnet 3.5. 

BTW How long will it take until we can do this with local models?! 

## Add full project to prompt
The latest version of the plugin allows you to add the full project to your prompt, your entire codebase now becomes part of the AI's context. This feature offers a depth of understanding that traditional code completion tools can only dream of.

![Full Project Context](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zjapt9yhylw5692gq7xk.jpg)

## Smart Model Selection and Cost Estimation
The language model dropdown is not just a list anymore, it's your 'compass' for smart model selection 🤩 👇🏼

- See available context window sizes for each cloud model
- View associated costs upfront
- Make data-driven decisions on which model to use for your project

![Smart Model DropDown](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ikg0q81jr411jsqivt2m.jpg)

## Visualizing Your Context Usage

Leverage the prompt cost calculator for precise budget management: 

- Track token usage with a progress bar
- Get real-time updates on how much of the context window you're using

Calculate token cost with Claude Sonnet 3.5

![Claude Sonnet 3.5](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o6u8kv9csjhl6hiwj70h.jpg)

Calculate cost with Google Gemini 1.5 Flash

![Gemini 1.5 Flash](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sd05dj2q61eune0drg0d.jpg)

![Project Added](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p9a0vsxjb7ypyf1zppcb.jpg)

## Cloud Models Overview

Via the plugin settings pages you can see the "Token Cost & Context Window" for all the available cloud models. In a near future release you will be able to update this table. I should probably also support the local models context windows... #PullRequestsAreWelcome 

![Cloud Models Overview](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qwgiz7qkz3b8kgdyjvqq.jpg)

## Handling Massive Projects?

"But wait, my project is HUGE!" you might say 😅 Fear not. We've got options:

### Leverage Gemini's Massive Context: 
Gemini's colossal 1 million token window isn't just big, it's massive. We're talking about the capacity to ingest approximately 30,000 lines of code in a single prompt. That's enough to digest many codebases, from the tiniest scripts to some decent big projects. 
But if that's not enough you have more options...

BTW Google will be releasing 2M and even 10M token windows in the near future.

### Smart Filtering: 
The new "Copy Project" plugin settings panel lets you

- Exclude specific directories 
- Filter by file extensions
- Remove JavaDocs to slim down your context

![Smart Filtering](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ekwilqkm2lmb659zjl14.jpg)

### Selective Inclusion 
Right-click to add only the most relevant parts of your project to the context and/or clipboard.

![Right Click Options](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cdvikarhvwbov100wmrt.jpg)
 
You can also copy your project to the clipboard, allowing you to paste your project code into an external chat window. This is a useful technique for sharing and collaborating on code 👍🏼 

## The Power of Full Context: A Real-World Example

The DevoxxGenie project itself, at about 70K tokens, fits comfortably within most high-end LLM context windows. This allows for incredibly nuanced interactions – we're talking advanced queries and feature requests that leave tools like GitHub Copilot scratching their virtual heads!

## Conclusion: Stepping into the Future of Development

With Claude 3.5 Sonnet, Devoxx Genie isn't just another developer tool... it's a glimpse into the future of software engineering. As we eagerly await Claude 3.5 Opus, one thing is clear: we're witnessing a paradigm shift in AI-augmented programming.

> Alan Turing, were he here today, might just say we've taken a significant leap towards AGI (for developers with Claude Sonnet 3.5)

Welcome to the cutting edge of AI-assisted development - welcome to DevoxxGenie 🚀

[X Twitter](https://x.com/devoxx.genie) - [GitHub](https://github.com/devoxx/DevoxxGenieIDEAPlugin) - [IntelliJ MarketPlace](https://plugins.jetbrains.com/plugin/24169-devoxxgenie)