sergio

sergio

This thread is just to chat about ways we can improve the Hexdocs ↔ LLM integrations to make it best in class.

I experienced this yesterday:

I was trying to improve my image background removal code that used @kip’s wonderful Image library. My version was using erode and had jagged edges, so using Google’s new Gemini 2.5 I was able to slowly ask it about:

  1. What problem I had initially.
  2. Here are some functions the Image library has.
  3. What do you want to see docs for?
  4. Repeat #2.

After a few back and forths it gave me a great solution that worked better that my original function.

It got me thinking: is there a way to better give these ever-improving AI models the docs and be more helpful to us Elixir developers? In the case of Image, I’m not really an image manipulation guy. My company does not specialize in image manipulation. I just need to remove a chroma key background as reliably as I can as fast as I can. I would have benefitted from a chunky document that listed all the module’s functions, instead of having to copy and paste it.

Is there a more native integration like having mix docs generate a ai text version of the docs that all one beefy chunk we can place into an LLMs context?

How do you guys work with hexdocs and AI? I’m curious if there’s a much better way I’m not aware of. Thanks!

Showing Posts 1 to 10

nulltree

nulltree

Roughly three better solutions:

A combination might even yield better results :slight_smile:

kip

kip

ex_cldr Core Team

I’m very curious about the actual solution you came up with (tangential to your topic I know). Always looking for a way to improve image. And background removal is something I’ve been investigating.

garrison

garrison

Don’t all of the big providers have search tools now? I think a general solution is always going to win here.

D4no0

D4no0

Honestly I always have the problem of finding the correct documentation, especially when it comes to bigger things such a phoenix.

I don’t think that specialized prompts for a bloated LLM is the way to go, as there is no information where the data was scraped from, this is especially a problem since a library usually has multiple versions, including major versions that change or introduce new things.

I think that fine-tuning a model such as BERT with elixir documentation might be something with a lot of potential, especially since we can make it aware of different versions of libraries. I was investigating this some time ago, but my poor desktop that was built on budget is not the best fit for training models, so iterations are way too slow for experimentation.

sergio

sergio OP

Sent you a DM!

ruslandoga

ruslandoga

And there is Finally, a Replacement for BERT: Introducing ModernBERT which claims better performance on code. So maybe it would be possible to embed both docs and each function source code and then use those for lookups!

D4no0

D4no0

It’s definitely possible, as there are already fine-tuned models that understand code pretty well.

I think it’s all about the way you decide to fine-tune and measure the efficiency, for me that honestly is still black magic as I’ve never delved into theory on this topic.

This also should be doable in elixir as bumblebee supports fine-tuning: Fine-tuning — Bumblebee v0.7.0

garrison

garrison

It’s interesting to consider whether RAG would actually beat full-text search (tool use) here. When I’m searching for docs my queries are almost always keyword searches, (library names, function names) - there’s not a whole lot of need for semantic lookups.

Again I really think the general solution will win here - you can do RAG on all of the docs in the world and still lose to a model that finds a blog post or forum thread which solves a given problem.

nulltree

nulltree

Interesting, I honestly think fine-tuning models is not the way to go, but rather create a system to provide the correct context to whatever LLM is the best at a given moment/in a given situation.

To that end, it should be ‘somewhat’ trivial to create a solution that always surgically inserts the newest docs of a given library when needed. Be it an MCP server that just fetches it, or a more sophisticated system that knows about the relevant libraries of a project, caches that info, and then retrieves the relevant sub-pages’ info when deemed relevant.

D4no0

D4no0

I think it depends on what you plan to be your end result.

I never cared about models guiding me on steps how to write code, but instead I want a flexible way to search for documentation. Either way, elixir core team said they are working on making such a tool happen, we will see what their end result will look like and the approach they decided to take.

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
AstonJ
Since we have deprecated our Erlang sections (as we have dedicated Erlang Forums now) let’s add this thread for those who’d like to post ...
New
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews