node icon indicating copy to clipboard operation
node copied to clipboard

Provide a `llms-full.txt` for the Node.js Docs.

Open mcollina opened this issue 10 months ago • 7 comments

We should add a llm.txt file to our docs set, so the Node.js docs is more fruible to llms. Here is an example of Anthropic's one: https://docs.anthropic.com/llms-full.txt.

This is useful to teach the LLMs about the new APIs they don't know about. We should ideally include some text also for the individual modules.

mcollina avatar Mar 22 '25 09:03 mcollina

cc @nodejs/documentation

mcollina avatar Mar 22 '25 09:03 mcollina

Here is an example of Anthropic's one: https://docs.anthropic.com/llms-full.txt.

is it basically MDX ?

AugustinMauroy avatar Mar 23 '25 09:03 AugustinMauroy

Can i work on this. I was thinking to fetch the html file of the docs page and convert to txt file and then remove all the redundant data.

iyush05 avatar Mar 25 '25 15:03 iyush05

Here is an example of Anthropic's one: https://docs.anthropic.com/llms-full.txt.

is it basically MDX ?

I think so.

mcollina avatar Mar 25 '25 15:03 mcollina

Has there been discussion or consideration of whether or not how LLMs are consuming our docs actually follows the license of them? Asking because my personal not-a-lawyer read is that The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. is not actually being respected when consuming/outputting the code in them.

bnb avatar Mar 25 '25 17:03 bnb

The purpose of docs is to help people use our tools. In 2025, we want developers to be able to use newer Node.js APIs with their tool of choice - very often, this is an AI-assisted editor. However, those editors do not know about the latest Node.js APIs because they usually learn from "old" articles. This will allow devs to teach"

LLMs are scraping this information anyway. We should make life easier for our users unless we want to block LLMs from consuming our source code. I would leave this to the courts to establish its legality and we should not be debating this.

mcollina avatar Mar 26 '25 09:03 mcollina

Can someone close this issue? Related work was done here: https://github.com/nodejs/api-docs-tooling/issues/226

ovflowd avatar May 04 '25 12:05 ovflowd