Using Cursor and llms.txt

I start using cursor, and I wonder which urls people use to add additional context for the OCaml language.

You can add documentation via urls:

image

I’m wondering if anyone has any good resources to add here.
At first glance, the Learn OCaml doesn’t provide a llms.txt.
Does anyone have some alternatives?

I’ve got an MCP OCaml implementation here you can “try at your own peril”; that can be used to write a local odoc query for Cursor.

This is entirely agentically coded as I’m experimenting with models, but MCP seemed an appropriate protocol to try that out for! However, it means the quality/risk of using it is definitely “buyer beware”.

2 Likes

Context is probably a bit different, because ahrefs is using a large monorepo and tradeoff are different, but we’ve been experimenting with writing pretty high level introduction prompt per technology. For example we have one for melange. I used openai deep research and Claude to write the initial version. Then we are starting a library of prompts related to specific libs/patterns/refactoring. Some are systematically used, some are loaded for given path, some are loaded automatically by the agent when it deems it useful.

Then for links to docs I actually point as generic documentation rather than llm specific text. For example the api of lwt, the one of melange, the OCaml manual, the page about runtime from RWO, …

It’s hard to evaluate the impact of each of those. The outcome seems to vary a lot depending on the model and the prompt and the task at hand. But I feel like it would be worth putting some efforts at least as part of an experiment to have comprehensive prompts a la cloudflare. See Prompting · Cloudflare Workers docs

1 Like