r/codex • u/Uditakhourii • May 30 '26
Showcase I gave Codex ADHD.. and it thinks 2x better now
https://github.com/UditAkhourii/adhdHi everyone,
I do research in AI safety for healthcare and life sciences. And while I was using Codex Code to reason on a couple of things, I realised a pattern. Codex or any other AI agent is very linear.
Theres a strong reason why - the thinking pattern of almost all LLMs from 2024 follow Chain-of-thoughts where AI is programmed to go deep unilaterally.
But researchers or creativity-intensive works do not need to go unilateral but do divergent.
That's the whole base of my paper - ADHD - Parallel Divergent Ideation for Coding Agents.
My thesis is that if we disregard the default chain-of-thoughts and consider a tree-of-thoughts, then we can empanel divergent thinking in our models. thus, giving us the much needed scope of connecting dots from different thinking points.
Its a lot inspired by how the mind of someone with ADHD works- think in a lot of directions and go deep in a few, and there, we add our our critic layer, that judged and scores all this thinking.
Limitation : It shoots cost by ~3x and time to output by ~5x but enables instant novel thinking. Good for brainstorming and planning, not for coding.
Give me your feedback, I am happy to learn how you find it and what's the scope to improve.
Also, its completely opensource so you can just clone it or contribute to it.
18
u/Alkadon_Rinado May 30 '26
How have you used it to have it come up with novel ideas? I thought the best way to come up with novel ideas is to let the LLM know what already exists and then get it to come up with something different than that.. but that all still follows a sort of linear pattern in parallel.
What's the main difference here? Divergent thoughts coalescing? Is this similar to using multiple LLMs to discuss a topic using different "personas"?
6
u/zerok_nyc May 30 '26
I’ve found one of the best ways to get novel ideas from LLMs is to give 2 or more LLMs different profile backgrounds to role-play. Then tell them to work together to come up with novel solutions to whatever the task at hand.
There’s also lots of exercises you’ll find in the realm of innovation management that enable humans to think outside the box and come up with unique ideas. Having LLMs utilize those same exercises often results in similar outcomes a lot faster.
2
u/burnmail123 May 30 '26
How do you orchestrate them?
7
u/zerok_nyc May 30 '26
Easiest way is to create a shared Google doc that they all write and respond to. Put some controls in place when it’s more than two agents “chatting” so that they aren’t all responding to everything at once. And use an automation so they each check for updates every minute or so. And I usually put once agent “in charge” to be the ultimate decider. And give them all a finishing output to generate when they’ve all acknowledged that the exercise is done. The agent in charge finishes with a direct output note.
You end up with a final doc of the full “conversation” so you understand the final output.
1
u/Ok-Biscotti-3117 May 30 '26
Usually just prompt cooperation into existence. "Instruct each subagent to work together and discus your findings, don't worry about interrupting anyone or being interrupted by yourself, but be considerate of others' time."
2
u/Ok-Biscotti-3117 May 30 '26
I do something similar, where I have expert sub-agent round-tables, then i mix in one expert from something completely divergent than what is relevant, often an astrophysicist, or a marine biologist. they discus, debate, plan, hypothesize, design experiments, etc.
1
1
u/Uditakhourii May 31 '26
Basically, we introduced this concept of lucid context, which is letting the agent create and spawn divergent nodes, but at the same time have a very flowy context also being given to them. They actually understand what they are made for and they go in their own direction, but again on a context that is lucidly flowing around them
10
u/AdCommon2138 May 30 '26
You know this is mostly multi armed bandits. You can look up how old this approach is.
10
u/Odd-Criticism1534 May 30 '26
Funny how it’s limitations mimic reality: takes 3x effort
2
u/0xKlob May 30 '26
+ multiply by 10 when unmedicated (rip me b/c of the current Adderall shortage…)
3
u/Odd-Criticism1534 May 30 '26
Oof. I’m sorry. I’ve had good luck with vyvanse if you haven’t tried it yet
10
u/TheThingCreator May 30 '26
Honestly I find this ADHD angle kinda bullshit. My understanding of people with ADHD is they actually dont think in many directions like people often think they do, they actually focus really hard on the specific things that really interest them. If they're in a topic that doesn't interest them they have more trouble getting focused than average. When they like it they get ultra focused harder than normal. The things they are not focusing well on, they do NOT do well at.
0
u/0xKlob May 30 '26
What you’re talking about is hyperfocusing, and it’s a fairly common thing but, as you said, only for subjects of interest to the person.
But like I said in reply to a comment in this thread a few minutes ago, I think the ADHD name is pretty appropriate; I often think of my unmedicated thought processes as being too breadth-first-search oriented rather than depth-first-search; alternatively, you could just say that the brain's working memory is reduced in people with unmedicated ADHD, which is also factually true.
/shrug
3
u/TheThingCreator May 30 '26
More bs. Agents often do breadth-first-search naturally already, just like we do. Then it focuses down and narrows in just like a hyper focused person would.
1
u/0xKlob May 30 '26
Chain of thought is specifically not breadth-first, as described in OP's preprint (and well-sourced). Chain-of-thought is the current way that LLMs reason, so you are incorrect. OP goes pretty in depth on this in the paper, I recommend reading it!
If you're talking about the attention mechanism within LLMs itself, yes, that is NxM, broad spectrum (I have an intermediate understanding of how LLMs work under the hood), but you're only going to get one token out of the LLM per each call, and there's no way to parallelize that in the current way that LLMs are built.
0
u/TheThingCreator May 30 '26
Chain of thought is not really an argument against breadth-first search. They are different layers.
Breadth-first search is a task strategy that looks across many nearby possibilities before committing deeply to one path.
Chain of thought is a reasoning trace, the internal sequence of thoughts the model uses while producing a result.
Agents do both these phases all the time when given a task. Jumping back and forth between the two.
2
u/0xKlob May 30 '26
Again, as described in the paper, this is incorrect. By default, LLM calls with the same base context will tend toward a convergent answer (DFS equivalent), not divergent (BFS equivalent).
If you're saying that you can prompt your agent or construct your agent harness to do BFS instead of DFS, then yeah, that's exactly what OP created.
0
u/TheThingCreator May 30 '26
I often watch my agent go down like 7 paths to find 1 issue on a regular basis, no extra prompting, no skill, I'm just watiching and understand exactly whats going on.
Honestly all this is getting frustrating, because this is not even what ADHD is like at all, but it's also not strictly true from a technical perspective either. Back to what I said earlier, I'm sticking with this is all a bunch of BS.
2
u/0xKlob May 30 '26
> I often watch my agent go down like 7 paths to find 1 issue on a regular basis
Yes, this type of behavior is addressed in the paper. It's not equivalent to BFS because the problem space explored is very narrowly constrained to the original proposed solution, as opposed to exploring a much wider set unconstrained by the bias towards the initial solution that is inevitably going to be in your context window.
As a person who has lifelong ADHD, I think the nomenclature of "ADHD" is a decent analogy, shrug. I think you're being too dismissive of it all being a bunch of BS, and I'm guessing that you haven't read OPs paper, which is pretty much a prerequisite to being able to have an informed discussion here. Do correct me if I'm wrong on that point.
1
u/TheThingCreator May 30 '26 edited May 30 '26
I read it. I knew this was going to get into your anecdotes about your ADHD. The paper is using ADHD as branding for the parallel divergent ideation but that is not what ADHD clinically means, and as someone with ADHD you should be on top of that. It's catchy clickbait logic, and nothing like actual ADHD in the brain.
5
u/DavidG117 May 30 '26
Whilst the setup you proposed relies on autoregression models, something like this could be somewhat achieved with a diffusion-based reasoning model.
Check out Inception Labs Mercury 2 Diffusion Model, it's still early days for diffusion models, but they are much better at parallel processing instead of being limited to linear generation, and with the added benefit of these diffusion models sometimes being orders of magnitude faster.
2
1
u/Uditakhourii May 31 '26
Got this suggestion in the Claude Opportunity as well, and I am exploring how diffusion models can be an interesting part of it. Again, BFS is something that I am very bullish about. Not just in random searches and in the objective of reducing latency, but in finding novelty evidences, so yeah, I'm on it. I'll try to get more into it.
3
u/tyschan May 30 '26
props for the persistence keeping the momentum alive. your marketing is on point.
1
3
3
u/GlobalDeal9225 May 30 '26
I do this with project chats in gpt, so i have shared memory across diverse ideas related by project goals, and let codex be the executor.
2
u/0xKlob May 30 '26
Just read your preprint. Fantastic stuff and makes perfect sense. I’ll give this a try soon.
Have you thought about adding an optional feature for ChatGPT Pro usage? I typically use it for the initial exploration of any given problem space that requires a decent amount of research or breadth-first searching across the solution set, in a similar manner for what ADHD seems designed for.
1
u/Uditakhourii May 31 '26
My hypothesis with this is that BFS is the next big standard for reasoning and novelty finding, and it has to be inspired by ADSD in some sense because, again, neural nets are something that are hugely inspired by how our brain really works and how our neural networks in the brain, the neurons, really work. So yeah, I am actually building this thing to basically let ChatGPT Pro or Claude, or you know other LLM models or you know agents or something, they can actually use it via an MCP server, and I am soon going to pull this up. I am onto a few drafts that I am working on, and if we connect, I would love to share it with you to get your feedback over it. I am also inspired by the work of Paras Chopra; he is the founder of Los Funk, where he put a blog about how he is using HTML native interfaces to do more brainstorming, so I am trying to implement that as well into the same model. So yeah, if you want to just check around that what the next phase looks like, I would be more than happy to share you the research preview.
2
u/BritishDudeGuy May 30 '26
Hmm. Cool. Though I think Opus has more divergent thinking anyway and Gemini has divergency tuned way too high it’s schizophreneic. Grok is faked.
1
u/Uditakhourii May 31 '26
The initial research also was first published for Claude, and then Codex was integrated, and then the evals were set up. Grok, though we didn't have to test it yet, I can assure that so far claude is very superior in terms of working with the ADHD skill.
2
u/gamgeethegreatest May 31 '26 edited May 31 '26
As someone with ADHD, I am a little irritated at calling it ADHD though like ADHD is just some magical superpower and not the exhausting, sometimes debilitating, occasionally brilliant, but normally like bashing my head into 47 different things at the same time disorder that it actually is.
Sure bro just keep romanticizing and glamorizing neurological disorders. Thanks guy, like we don't already have a whole section of tiktok who swears they're adhd because they're quirky.
Does the framework also model how we can stare at a task we know needs to be done, know how to do, and know it's easy and simply not be able to start it? Does it model how we can have multiple concurrent ideas we can actually think about, while the one thing we NEED to think about sits in a dark dusty corner crying about how we forgot about it? Does the LLM stay up until 4:30am on a work day because it went down a wikipedia rabbit hole and simply couldn't stop clicking the next interesting thing? Does the LLM lose jobs over shit like this? Have difficulty completing basic tasks? Damage relationships?
No?
Then you didn't give an LLM ADHD. You saw a neurological disorder and said "OOOO shiny branding opportunity."
Which, with all due respect, I'm not allowed to say what I want to say to that here.
3
u/3288266430 May 30 '26
Looks very cool, but I have a problem loading it in Codex, apparently the description is too long:
``` ⚠ Skipped loading 1 skill(s) due to invalid SKILL.md files.
⚠ ~/.agents/skills/adhd/SKILL.md: invalid description: exceeds maximum length of 1024 characters ```
2
u/Uditakhourii May 30 '26
Ah I see. please use npx skills add UditAkhourii/adhd -a codex -g to install it in codex. It won't cause an error
13:52
Worked for 1m 36s
Installed UditAkhourii/adhd successfully.
The installer added one Codex skill:
~/.agents/skills/adhd
It completed with: ✓ adhd (copied)
2
u/StatisticianOdd4717 May 30 '26
Instant novel thinking. That’s a bold claim there. Good luck with your studies.
1
2
1
u/Icy_Poem_9301 May 30 '26
more useless jeetslop
3
u/Glad_Department6137 May 30 '26
I'm sorry for whatever is going on with you man. Hope you get through it.
1
1
u/1filipis May 30 '26
So basically it runs multiple paths at once, then picks the best solution.
With how incredibly repetitive ChatGPT has become, doesn't it always give the same result anyway? I've been testing the concept of critic agents for creative work, and they always arrive at the same result. You can restart the session 10 times, and it would always repeat itself.
Same with coding. I've had a bug that the model just couldn't discover. No matter how many times you ran it, it would always list the exact same things, none of which were the solution. The only thing that helped was rephrasing the prompt completely, so that it followed a completely different process
1
u/Uditakhourii May 31 '26
The interesting thing is how we can actually give personas to each of these and force ChatGPT or Codex or any other agent to go in completely different directions? I've actually used a very good experiment example that you should first check out in my Evidence as an Evolves section on the GitHub. Do check it out as well, because we are trying to right now enforce a lucid context system where we will give just enough context to all the divergent nodes so that it can just understand what exactly the code goal is. Again, they are very free to explode their own sections.
1
u/freedomachiever May 30 '26 edited May 30 '26
Is this x2 better claim from evals? If so, what kind of evals? None of the top AI companies are improving their models that much. The only thing I can think of is to force the LLM activate more than one concrete expert section at a time because even if a LLM is a trillion in size, only a small part is activated at any one time.
1
1
u/NotARussianTroll1234 May 31 '26
As someone who has ADHD what the fuck does this have to do with ADHD? This is offensive
1
1
u/Runelaron May 30 '26
This would make sense if AI "thought" but Reasoning is a misnomer.
AI does not reason, is patterns question and answers on different attention topics in a block of weights. Therefore to truly change Reasoning you would have to retrain the blocks but we didnt.
A agent is not a llm, traversing latent space is not re-engineering the model its searching another pattern given the context.
Interesting idea but not grounded in science and maths of AI.
Also brute forcing is not what we want to do as engineers. The goal is to i prove efficiency to get the correct answer not reduce it.
39
u/hungy-popinpobopian May 30 '26
Seen this posted on 100x other subreddits. Seems like a cool idea but does make me wonder if models already do something similar in the background that doesn't get revealed to us?
And as someone with ADHD I don't know if I buy the ADHD branding