The lifecycle of a code AI completion
sourcegraph.com
sourcegraph.com
Chapters like "The Strive for Faster Latencies" and "Post-Processing" are truly inspiring.
Creating production-level DevTools demands much more effort than merely wrapping around a ChatCompletion endpoint and mindlessly stuffing a context window with everything accessible inside the IDE (so-called "prompt engineering").
Interesting, what gave you this impression? This article was first published only 4-6 months ago around Oct 2023.
Don't get me wrong, I'm a fan of sourgraph and their founder, Quinn, is quite charismatic. I almost went for a job offer with them 5+ years ago. But let's be real, startups are not a winning game for a non-founder, thank goodness I stuck it out with BigCorp. In any case, this isn't that old of a post, cheers.
I'm guessing you're just reading into the phrase an implication that isn't there about it being particularly old.
You dan't have to trust me: https://dictionary.cambridge.org/dictionary/english/for-some...
I'm curious why you think a big corporation has a higher expected value than a startup.
Spent the last 5 years at 2 different startups.
Presently unemployed and broke due to literally worthless equity.
For a long time it’s been about extravagances like the ability to recover from a lost session, or get a link queried and used as context, or do a reset of the slowly but inevitably corrupted state without losing all of your painstaking assembled point in some abstract state space.
Basic product building on the core LLM experience is way more important than incremental improvements on LLMs, I’d take robustness, consistency, and revision control over an LLM breakthrough, a chat bot session is a tech demo if I lose my work with my browser tab.
These folks get it, I agree.
> In fact, this is pretty much how we started out with Cody autocomplete back in March!
Am I wrong in thinking that there's only like 3(?) actual AI companies and everything else is just some frontend to ChatGPT/LLama/Claude?
Is this sustainable? I guess the car industry is full of rebadged models with the same engines and chassis. It's just wild that we keep hearing about the AI boom as though there's a vibrant competitive ecosystem and not just Nvidia, a couple of software partners and then a sea of whiteboxers.
That's what I don't get about all these AI startups. The core value of their business is an API call they don't own. It's like people who were selling ______ apps on iPhone when Apple added their own built-in _____ features to iOS, except the entire industry is like that.
GitHub and Microsoft are more likely candidates. GitHub Copilot is a competing product that could be improved if they chose to do so.
I'm saying that a small company whose biggest competitor is also their key supplier is, if not doomed, at least operating on borrowed time. If my value proposition is reselling AWS hosting with an easy-to-use dashboard, I better pray to god Amazon never makes AWS simpler.
Edit: looks like the autocomplete provider is configurable in the VS Code plugin settings. Not sure what the default is.
For autocomplete we're using Starcoder 16b.
We also support local inference with any LLM via Ollama (this is experimental and only for Cody Free/Pro users). Enterprise customers can choose which LLMs they want.
I would also question the idea that OpenAI could build a code editing companion this robust in a fee weeks. It’s been a long time since the models have been the limiting factor in these tools.
But your API provider gets to see most of that because you send it to them along with your prompts. I don't know what the ToS for these AI providers are like, but it seems like they could trivially copy your prompts.
But I think this line of thinking is a bit ridiculous. Yes, if you send your data to a database service, that provider has your data and theoretically use it to run you out of business. Except they kinda can't, both as a matter of practicality and legality. OpenAI, Anthropic, and others have SOC II compliance. The easiest way to ensure you run yourself out of the market is to start violating that stuff.
the role of an AI startup is to come up with ideas, thus useful products. Most of existing products pre-AI, are also front ends to existing operations systems and exiting databases, because creating the whole stack does not make sense. At least we have state of the art open models that we can use freely
It can be used with a number of local model services. Currently for my setup on a NVIDIA 4090, I'm running both the base and instruct model for deepseek-coder 6.7b using 5_K_M Quantization GGUF files (for performance) through llama.cpp "server" where the base model is for completions and the instruct model for chat interactions.
llama.cpp: https://github.com/ggerganov/llama.cpp/
deepseek-coder 6.7b base GGUF files: https://huggingface.co/TheBloke/deepseek-coder-6.7B-base-GGU...
deepseek-coder 6.7b instruct GGUF files: https://huggingface.co/TheBloke/deepseek-coder-6.7B-instruct...
My company buys copilot for all devs, but doesn’t use GH or GHE
This does exist in GitHub Copilot - it’s called content exclusions: https://docs.github.com/en/copilot/managing-github-copilot-i...
I’m not sure if Cody has a similar feature, or if there’s any move towards a standardised solution.
> This feature is available for organization accounts with a Copilot Business subscription.
And even if you exclude the moment anyone starts a chat the files are read and sent and could form suggestions:
> Excluding content from GitHub Copilot currently only affects code completion. GitHub Copilot Chat is not affected by these settings.
Both quotes from your link
Does it mean engineers created the feature but managers disabled it for some users?
In this context, it means that I (a hobbyist) get to enjoy copilot at a discounted rate because there are some feature (context exclusion) which were costly to implement that I am not using. So it makes sense for me to take a less expensive plan which only includes the core features without the cruft. If there is any of these additional feature that I need, then I just need to pay for the engineering time that went into them, which takes less than a few seconds, it's just a button to click on. Fair and square.
In the Cody settings.json file you can disable autocomplete on entire languages/file types.
Additionally, we recently rolled out a Cody Ignore file type where you can specify files/folders that Cody will not look at for context. This feature is still in experimental mode though. https://sourcegraph.com/docs/cody/capabilities/ignore-contex...
With Cody, we have a relationship w/ both Anthropic and OpenAI to never use any data submitted via Cody users for training and data is not retained either.
Can you say more about this? Is it public? Contractual? Verifiable somehow?
https://sourcegraph.com/terms/cody-notice
Sections I-IV :)
Neither Anthropic and OpenAI seem to be particularly mature organizations so while maliciously lying to their customers (you) about this would surprise me, “accidentally” not separating data sources would not be very surprising at all…
Most secret managers allow you to either specify value references in .env files, or provide a way of running programs that specifically gives them access to secrets.
Or maybe a set of sensible global default ignores, based on the usual suspects from gitignore.io or suchlike ?
As far as I know .env file is the main supported way of setting environmental variables in VS Code.
> One of the biggest constraints on the retrieval implementation is latency
If I’m getting a multi line block of code written automagically for me based on comments and the like, I’d personally value quality over latency and be more than happy to wait on a spinner. And I’d also be happy to map separate shortcuts for when I’m prepared to do so (avoiding the need to detect my intent).
For autocomplete, at the moment we only support Starcoder because it has given us the best return on latency + quality, but we'd def love to support (and give users the choice to set an LLM of their choice, so if they prefer waiting longer for higher quality results, they should be able to)
You can do that with our local Ollama support, but that's still experimental and YMMV. Here's how to set it up: https://sourcegraph.com/blog/local-code-completion-with-olla...
I wish y'all would put a little more effort into user experience. When you go to subscribe it says:
> Claude Instant 1.2, Claude 2, ChatGPT 3.5 Turbo, ChatGPT 4 Turbo Preview
Trying to figure out what's supported was tedious enough[0] that I just ended up renewing my Copilot subscription instead.
[0] Your contact page for "information about products and purchasing" talks about scheduling a meeting. One of your welcome emails points us to your Discord but then your Discord points us to your forum.
That link to the list of supported languages is broken. I couldn't find a similar file elsewhere in the repo: maybe the list got folded up into a function in another file? Also a bit annoying that I couldn't find the info on the company's website (though I gave up pretty quickly).
But this test didn't seem to include TypeScript so it's obviously not comprehensive. I'm not convinced this information is actually in one place.
What I find frustrating is that Cody is doing deterministic language-specific tricks that don't depend on the underlying LLM, so why not just give a list of all the languages you did deterministic tricks for and call that the supported languages? Why be vague? Why deflect to the underlying LLM to encourage people to try your product with languages you won't do any work to support?
Claiming it works on "all programming languages" is lazy and dishonest, and clearly false. There's nothing magical about LLMs that relieves software developers of the duty to specify the limitations of their software.
Nothing here is dishonest. We’re open about the limitations of the LLM being the main determining factor, and the numerous languages we’ve prioritized making it work well on. I see your point about not mentioning “etc.” in the shell scripting parenthetical. Will update.
I wrote a blog post comparing Cody to Copilot a little while ago. Some of the stuff might be outdated now, but I think it still captures the essence of the differences between the two. Obviously I'm a little biased as I work for Sourcegraph, but I tried to be as fair as one could be. Happy to dive deeper into any details. https://sourcegraph.com/blog/copilot-vs-cody-why-context-mat...
Our biggest differentiators are context, choice, and scale. We've been helping developers find and understand code for the last 10 years and are now applying a lot of that to Cody in regards to fetching the right context. When it comes choice, we support multiple LLMs and are always on the lookout in supporting the right LLM for the job. We recently rolled out Claude 3 Opus as well as Ollama support for offline/local inference.
Cody also has a free tier where you can give it a try and compare for yourself, which is what I always recommend people do :)
Correct url: https://sourcegraph.com/blog/copilot-vs-cody-why-context-mat...
I ended up disabling copilot. The reason is that the completions do not always integrate with the rest of the code, in particular with non-matching brackets. Often it just repeats some other part of the code. I had much fewer cases of this with Cody. But, arguably, the difference is not huge. But then add on top of this choice of models.
For instance, I'd often get a problem where I'd type "foo(", and VsCode would auto-close the parenthesis, so my cursor would be in "foo(|)", but Copilot wouldn't be aware of the auto-close, so it would suggest "bar)" as a completion, leading to "foo(bar))" if I accepted it. But I haven't had this problem in recent versions. Other similar papercuts I'd noticed have been fixed.
I haven't used Cody, though, so I don't know how they compare.
In particular, Copilot seems to do better at generating missing TypeScript import statements. These are relative imports of files in the same small repo. Neither of them seems to really understand my codebase in the way that Cody promises - they make up imports of nonexistent files. Copilot sometimes guesses the right file, I think based on my understanding my naming conventions better.
FWIW I believe Cody is much more actively developed than Copilot is these days, and so it has a more comprehensive feature set.
https://sourcegraph.com/blog/copilot-vs-cody-why-context-mat...
Our biggest differentiators are context, choice, and scale. We've been helping developers find and understand code for the last 10 years and are now applying a lot of that to Cody in regards to fetching the right context. When it comes choice, we support multiple LLMs and are always on the lookout in supporting the right LLM for the job. We recently rolled out Claude 3 Opus as well as Ollama support for offline/local inference.
Cody also has a free tier where you can give it a try and compare for yourself, which is what I always recommend people do :)
On Neovim, Cody actually does have experimental support for neovim: https://sourcegraph.com/docs/cody/clients/install-neovim. Not all features are supported as in VS Code though.