Chat-UI, the codebase of HuggingChat, is open sourced
github.com
github.com
I think there are two things we can take from discord/fb messenger/slack to improve it:
1) ChatGPT and this thing needs threads. I want to be able to take a conversation and fork it - with separate conversational memories/context after a point of forking. I want to be able to take a message, go "reply" to it, and be able to do that as many times as I want, per message, with each reply being treated independently of all other replies. It is insanely useful to be able to take a conversation / debugging session / etc into a different direction experimentally without risking the entire state of the conversation thus far.
2) I want to be able to react to the messages. Thumbs up / down, agree/ disagree, etc - a small set of reactions to drive behavior would be huge, and would cut down on a lot of back and forth verbosity that plagues these.
If you hover over your message, an edit button appears. Editing your message fork the conversation, and creates a pagination thing to the left of the user icon.
For the thumbs, this does not seem to change the conversation in any way - ChatGPT does not react.
For editing (this is new to me, so TIL, ty!) - it seems to share memory across threads in a few naive tests I just did, so almost there, but not entirely.
With that said, I was frustrated with this enough to build my own tool that allows you to branch/fork any conversation into an entirely new chat (“seeding”).
Overtime we’ve added agents, multiplayer, memory, document upload etc. but the most used feature is still the branching/seeding concept.
Happy to share more details if curious!
How do you structure the memory for your chats? Is that a separate feature from the document upload?
To be candid, remembering every message in a conversation isn't actually that useful, so by default we don't (search is an exception), and instead rely on a method that extracts the "novel" information for use later.
Happy to set you up with an account, email in profile.
Unfortunately, I haven't found a better UI replacement yet. ChatGPT on OpenAI doesn't cut it - that app is, for some reason, way too slow and heavy for my Firefox, both on my laptop and my phone.
As for GP's request in general: I fear this is unfortunately the blind spot of communication tools design showing up again. With ChatGPT, it's important more so than ever, to recognize that a prolonged discussion will naturally fit a DAG. Not just a tree, but a directed acyclic graph.
(Tree is what you get when you want to branch out. DAG is what you get when you then want to merge branches back, or generally reference multiple parallel threads in one response.)
EDIT: This took me by surprise - someone actually did a tree interface for ChatGPT!
See: https://github.com/jumang4423/treed-gpt4
Discovered via: https://news.ycombinator.com/item?id=35909273 (thanks 'itsuka!)
> someone actually did a tree interface for ChatGPT!
In case anyone is interested, UCSD Creativity Lab has a couple DAG UIs that offer richer interactions and visualizations:
- Sensecape: https://twitter.com/HaijunXia/status/1646919380704559104
- Graphologue: https://twitter.com/HaijunXia/status/1646917869115166720
According to the discussion on the thread, they are in the process of open sourcing these two projects.
I can kind of understand it from a human perspective, sometimes someone will write a big block of text and you want to respond to different parts of it, so it branch off in that way, or you have 2 different people respond to the same parent comment and have it branch that way.
But merging -- sure I can see how a human might bring the ideas in each thread together again into one cohesive thought but visually, like in a UI, how would you represent that?
And how would you feed that back into ChatGPT? ChatGPT takes in a linear ordering of messages, not a tree or DAG.
---------------------------
( THREAD ROOT )
----------+---+------------
…-----+ +---…
| |
+--+---+ +--+---+
| AAA | | BBB +--+
+--++--+ +--+---+ |
+--+ || +--+ | |
|A1+-++--+A2| | +--+-+
+-++ ++-+ | | B1 |
| | | +--+-+
| ++-+ | |
| |A3| | |
| ++-+ | …
+-+----+ | |
| CCC +--+--------+
+--+---+
|
…
(Note: this is meant to be a DAG - so edges have implied arrows.)Here, reply "CCC" referred to / quoted replies "A1", "A3" and "BBB" - not only merging sub-branches of subthread "AAA", but also joining in subthread "BBB" as well. Text-wise, it would look something like:
> [quote from A1]
Yes, another poster covered it [BBB](here):
> [quote from BBB]
Also, [A3](that other thing) is actually the same thing
in disguise, because ...
We've been doing stuff like this for ages - personally I've seen or done it many times on phpBB boards and in e-mails - but, because the interface itself was linear (or at best tree-shaped), you have to keep track of the implied DAG on your own, in your head. What I'm asking/wishing for is an UI that supports and visualizes this natively.> And how would you feed that back into ChatGPT? ChatGPT takes in a linear ordering of messages, not a tree or DAG.
One possibility:
See diagram above. THREAD ROOT is your prompt. Say "CCC" is your reply. When you send it, the app would take the subgraph that stars with "THREAD ROOT" and ends with "CCC" (i.e. containing these two nodes and all other nodes on any of possible paths between start and end), and sort them topologically to get a linear sequence.
To give GPT-4 extra chance at comprehending the structure, we could even format each message like this:
Chat-Message-ID: <CCC-uuid>
In-Reply-To: <A1-uuid>, <A3-uuid>, <BBB-uuid>
Text of the message.
Kind of like e-mail.With GPT-4 32k, we could probably just dump the entire graph, to give GPT-4 a chance to make merges/cross-references on its own.
Also: it's really the same thing as e.g. resolving dependencies when building software. Dependencies form a DAG, but build order is linear (excluding parallelism, which is an optimization) - the build system toposorts the DAG and builds things in order.
You have to click “Edit” on a previous prompt, and then “Start new chat from here”. I don’t know where this is documented, but the FAQ chatbot (https://www.typingmind.com/faqs) was able to answer my question “How do I fork a conversation?”, and it does seem to work as described.
Ah, here it is (partly): https://tdinh.notion.site/Features-14e2788cd7264d87b0a4bf71b...
That's one of the perks of open sourcing it, I suppose.
In addition to the usual speech synthesis/recognition and embedding/vector search features, there are also:
- Node layout
- Multiple LLMs and parallel output
- 3D avatar
- Selection + custom context menu (for extensions)
- Native app integration such as Siri and Calendar (for Shortcut in Apple ecosystem)
- etc. (I'm sure there are many other interesting UIs and features that I missed.)
https://github.com/FerretDB/FerretDB https://hn.algolia.com/?q=Ferretdb
Example: chat-ui/src/routes/settings/+page.server.ts
This is past 2021.