Unichain Docs

AI Coding Guide

Unichain docs are LLM-ready and help developers build on Unichain faster and more efficiently.

Understanding Context Windows

AI models have a context window, which is the amount of text they can process at once. This is typically the number of tokens that can be processed in a single request (more like it's memory capacity). Once the context window fills up, parts of your conversational history may be lost.

It is exactly for this reason, providing relevant context upfront is critical.

llms.txt and llms-full.txt

Depending on the model's context window, you can either use llms.txt or llms-full.txt. Most of the modern models have a context window of about 100k tokens.

For most cases we are good to go with llms.txt as it is more compact and provides the LLM with necessary information about links from the documentation and what it does.

If you are using a model with a larger context window, you can use llms-full.txt. It is a more verbose version of llms.txt and provides the LLM with more information about the documentation.

Using llms.txt or llms-full.txt file

You can provide your code editor with a llms.txt or llms-full.txt file to use Unichain docs as a context for your code.

Here's how to do it for some common code editors:

Cursor

  1. Navigate to Cursor Settings > Features > Docs
  2. Select “Add new doc” and paste the following URL:
https://docs.unichain.org/llms.txt

or

https://docs.unichain.org/llms-full.txt
  1. Use @docs -> Unichain to reference Unichain docs in your chat.

Windsurf

Windsurf doesn't have a permanent settings menu for adding documentation context, so you need to reference it in each conversation where you want to use it.

  1. You can directly add it to the Cascade window (CMD+L) using:
@docs:https://docs.unichain.org/llms.txt

or

@docs:https://docs.unichain.org/llms-full.txt

Last updated on

On this page