BillBarnhill (@BillBarnhill) header
BillBarnhill (@BillBarnhill) profile picture

@BillBarnhill on https://xitter.gq/t.co/bCq2pElf1x @BillBarnhill on https://xitter.gq/t.co/hJufOjOdKO 25+ year sw engineer with a focus on distributed systems, messaging, blue check

42.967621,-75.440524
Joined December 2008
Photo by BillBarnhill (@BillBarnhill)Photo by BillBarnhill (@BillBarnhill)Photo by BillBarnhill (@BillBarnhill)Photo by BillBarnhill (@BillBarnhill)
𝗥𝗔𝗚 (Retrieval Augmented Generation) vs. 𝗖𝗔𝗚 (Cache Augmented Generation). There has been a lot of buzz surrounding CAG lately. Let’s see what the differences are betweenRAG and CAG: 𝘙𝘈𝘎 These are the steps for implementing generation for naive RAG: 𝟭. Embed a user query to be used for contextual search via vector DBs or move straight to the step 2 if no contextual search is required. 𝟮. If Contextual search is required, query the context store to retrieve relevant context. If it is not required, use other means to search for relevant data 𝟯. Combine original user query with the system prompt that instructs the final answer construction. 𝟰. Enrich the final prompt with external context retrieved in step 2. 𝟱. Return the final answer to the user. 𝘊𝘈𝘎 𝟭. Pre-compute all of the external context into a KV Cache of the LLM. Cache it in memory. This only needs to be done once, the following steps can be run multiple times without recomputing the initial cache. 𝟮. Pass the system prompt including user query and the system prompt with instructions on how cached context should be used by the LLM. 𝟯. Return the generated answer to the user. After this, clear any generations from the cache and keep only the initially cached context. This makes the LLM ready for next generations. 𝘔𝘺 𝘵𝘩𝘰𝘶𝘨𝘩𝘵𝘴: ➡️ While it has only been described in a white paper for the first time, it is not a novel concept. We have been using different variations of CAG since Anthropic and OpenAI introduced Prompt Caching. ❌ While it might sound strong on paper, LLMs continue to suffer in accuracy while working with extensively long context. ❌ In real use cases, especially enterprise, CAG would cause a lot of security issues due to inability to isolate data. ❌ CAG does not work with constantly changing data as KV Cache would need to be continuously recomputed. ✅ CAG is strong when you need to cache reasonable amount of static data that is not sensitive. ✅ Real magic happens when you combine RAG and CAG into a single system. More on it in future posts, stay tuned in! Have you played with CAG already? Let me know in the comments 👇 #LLM #AI #MachineLearning Want to learn how to build an Agent from scratch without using any LLM Orchestration framework? Check out my article here: newsletter.swirlai.com/p/bui…
23
203
13
984
98,634
BillBarnhill retweeted
Almost five long years of blood, sweat, and tears… and it’s finally here! 🙌 Thank you to everyone who helped and supported me—we did it! 🎉 It feels surreal to finally hold it in my hands 🤗
19
58
11
625
44,059
BillBarnhill retweeted
Update! My Elixir Stream Week talk will be on Elixir v1.18: The next Elixir version will be a massive step up in several directions. Come listen to the progress on the on-going type system work, Language Server pubsub, built-in JSON capabilities, ExUnit features, and much more!
📢 One week left until Elixir Stream Week! Aaaand also one exiciting update to the linup 👀 Get ready for @josevalim's broadcast, where he'll talk us through all the exciting changes to @elixirlang v1.18 🔥 More about ESW: elixir-webrtc.org/esw.html #MyElixirStatus #ElixirRadar #ElixirStreamWeek #ESW
3
19
2
158
8,566
So... my contract gigs will end in a few days. I’m now looking for a job! 🤓 - Principal engineer, backend/systems/arch focus - Fully remote, flexible hours (hard to find ppl in the same tz), pref async work - @elixirlang is def my strength, but I just love doing stuff
7
50
8
116
15,037
The @ZNBLLC @Kickstarter has not reached its goal but that's not the end of these anthologies. I'll figure out a way to get them out there. Keep watch for whatever comes next. And thank you to everyone who backed this project! #kickstarter #crowdfunding #fantasy #scifi #sff
1
6
6
247
BillBarnhill retweeted
If you are using GitHub to manage your Elixir project, you may also want to set up a CI pipeline 🏗️ I wrote an article on how to create a basic workflow using GitHub actions. It covers testing your application, publishing to hex and containerization 🐳 farens.me/blog/elixir-ci-tes…
13
67
9,016
BillBarnhill retweeted
While teaching a python class today, the student watched me do some magic with zed editor and immediately pleaded we use it instead. Sadly they were all windows users.
6
1
11
336
BillBarnhill retweeted
Erlang/Elixir is just bananas. This is how many lines of code it takes for me to support compiling a machine learning CPU/GPU model in one node (it can be expensive, 30s+), and then send it to another node AS IS for execution: github.com/elixir-nx/nx/comm…
3
68
5
402
25,534
BillBarnhill retweeted
"Zero to Production in Rust" has been updated! It now uses the latest Rust compiler and the latest version of all its dependencies. Many reader-reported issues have been fixed, both in the content and in the typesetting. If you were thinking about it, go get a copy!
33
144
13
1,162
151,390
Back WERE-2, an #sff #anthology from @ZNBLLC on @Kickstarter at tinyurl.com/ZNBKickstarter20… NOW! Stories about #shifters other than #werewolves by @RandeeDawn, @AustonHab, @GiniKoch, and @GailZMartin! Support now! #amreading #amwriting #fantasy
4
3
154
We are $609 away from $10K in the latest @ZNBLLC @Kickstarter for 3 new #sff anths about #shifters, #pirates, and a #sharedworld city at the center of 8 portals! BACK NOW at tinyurl.com/ZNBKickstarter20… and help us reach $10K by the end of the day! Support #SmallPress! #fantasy #scifi
1
4
4
178
Five hours into the latest @ZNBLLC @Kickstarter as we're at $4,322! Have you pledged it yet? 3 new #sff anths featuring #shapeshifters, #pirates, and a #sharedworld! Back now at tinyurl.com/ZNBKickstarter20…! Support #SmallPress! #kickstarter #crowdfunding #fantasy #sciencefiction #sff
4
6
140
Announcing the official Elixir Language Server team dlvr.it/TBybm2
5
1
61
1,458
BillBarnhill retweeted
Please welcome Elixir's official Language Server team: @icecreamcohen (Lexical), @mitchhanberg (NextLS), and @lukaszsamson (ElixirLS) team up to provide a unified language server platform. Read all about it here: elixir-lang.org/blog/2024/08…
40
214
53
1,196
66,004
This is today people! SKULL X BONES, that's me!
4
7
103
The latest @ZNBLLC @kickstarter is LIVE!!! Back 3 new #sff themed anthologies called WERE-2, SKULL X BONES, and AMPYRIUM: MERCHANT WAR now and get up to 15 digital bonus rewards, including @bentateauthor's #epicfantasy novel CRYSTAL LATTICE! tinyurl.com/ZNBKickstarter20… #kickstarter
1
6
2
8
1,211
BillBarnhill retweeted
👋 I wrote a new Rust course 👀 It's called "100 exercises to learn Rust" and it teaches you the language one exercise at a time. You can't follow the course without getting your hands dirty with the compiler, by design.
14
226
15
1,555
136,240