32 ms·
Prompting GPT to do rich text editing. Instead of replacing the entire document or selection, we want it to create diffs or operations for the minimal amount o
by bhl 2y ago
Prompting GPT to do rich text editing.
Instead of replacing the entire document or selection, we want it to create diffs or operations for the minimal amount of edits as possible. This helps preserve intent better when merging the doc later on with OT/CRDTs. (Of course, you could also ask GPT to semantically merge docs for you haha).
So far, it's been harder than plain text or spreadsheets which have an easier position/coordinate system to work with: just line-col or row-col.
Rich text is usually stored as trees with json or html. Have seen a paper (https://www.inkandswitch.com/peritext/ https://www.inkandswitch.com/peritext/) that represents it as a flat array.
Difference in approach would then be: is it easier for gpt to work with diffs or with operations/tool calls?
- yawnxyz 2y agowow could you please share more of this work? I've been wondering how to make a diff tool / simple text editor for academic writing
- isaksamsten 2y agoI’ve been developing a plugin for the Neovim text editor called sia.nvim, inspired by the Egyptian deity Sia. You can check out the GitHub repository here: https://github.com/isaksamsten/sia.nvim https://github.com/isaksamsten/sia.nvim. I also have a few screen recordings showing its capabilities. I’ve been using it for about six months to enhance my writing. The plugin leverages a language model to suggest text improvements, features a split-view interface, and allows users to select the edits they want to keep from a diff. It’s still a bit rough around the edges, and the code is quite messy since I’m still learning Lua and the Neovim API. However, I’m gradually improving it whenever I find the time.
- rahimnathwani 2y agoI want something like this that will add comments and suggested edits to Google Docs.
- bhl 2y agoOne insight I’ve gleaned from working on this project is that I’m convinced web dev will trend towards well-designed and modular components with accessible state and mutators. LLMs will then have a set of these components to dynamically route and build interfaces with. Component libraries are already popular and more time will be spent inside of them than managing the glue that is outside.
- ckrapu 2y agoI do this with Cursor for research work