hyperdiv / hyperdiv-docs

The Hyperdiv documentation app, implemented in Hyperdiv
https://hyperdiv.io
Apache License 2.0
12 stars 9 forks source link

What's the best way to create llm consumable documentation for hyperdiv? #10

Open idvorkin opened 1 month ago

idvorkin commented 1 month ago

I love hyperdiv, and want LLMs helping me write them! Hyperdiv has awesome docs, so thinking about how to get the docs to the LLM!

FastHTML tackles this by publishing llm.txt, documentation to be used by the LLM. Is there a recommended path to do this from the docs app?

LLM Text in general: https://llmstxt.org/ FastHTML's version w/links : https://[docs.fastht.ml/llms.txt](https://docs.fastht.ml/llms.txt) FastHTML's version w/links inlined: https://[docs.fastht.ml/llms-ctx-full.txt](https://docs.fastht.ml/llms-ctx-full.txt)

idvorkin commented 1 month ago

OK, I went a bit crazy and extracted them using ast-grep. I'm certain there's a better way, but this was fun, and comes close:

https://github.com/idvorkin/LinqPadSnippets/blob/0b1efd0cafc082644801a0dc77dd90c7507f43b5/python/dump_hyperdiv_docs.py?plain=1#L17

If we want to merge in some variant of this holler.

idvorkin commented 1 month ago

Here are the generated docs: docs.md

idvorkin commented 1 month ago

And if you want a giggle, I used GPT to figure out the document sort order :)