I added @docs, do I need to reference them all the time?

Here is what I added:

The first is over 2000 pages.

Do I need to keep adding the docs by clicking on Add Context, like this every time I open Cursor

Also it was mentioned to me that the AI would reference these docs, but how can it do that when there are as many as over 2000 pages in just one @docs.

Hey, when you add documentation to the context, you ask a specific question, and the model searches through the documentation, finds the answer, and responds to that specific question. While some data might be cached in the context window, it doesn’t cache everything. The model might have its own knowledge on the topic, which could be outdated. So, if you don’t reference the documentation next time, the model won’t have access to it. I recommend adding the documentation to the context each time to ensure the information is current.

2 Likes

Hello, just to clarify.

Do you mean the Claude model will search through the documentation. Is that Claude model running on your servers? There are 2,000 pages to the Apple docs that I added with a trailing /. I assume it won’t search all 2,000 or will it.

Sorry for asking maybe basic questions, but I am new to all of this.

The Claude model operates through a service provider, and the documentation is stored in a cached form on our server. The model doesn’t access the site directly but refers to our version.

So if for example I am building an iOS application and the model does not know anything about the latest release of iOS. How does the model know a new release even exists and how does it go to your cached version?

You just reference it in the request using @, and it will find the current information related to your question.

@deanrie If you reference @docs once in a Cursor composer or chat, is that sufficient for all subsequent messages in that thread? Or must you tag the docs everytime I send a message in that same thread in order for cursor to continue considering them?

Yes, it doesn’t keep all the documentation in context, so you need to refer to it each time.

ok thanks

If I use the new project rule to refer the latest indexed docs will that be automatically added to the context?

For Example I have created the following project rule:

Description: While working Next JS project use this rule to get the latest Next JS docs
Globs: *.tsx, *.ts

Rules

  • use @NextJs 15 docs to get the latest info on Next JS 15
  • Make sure to use server actions instead of API routes.

How will it be used in the context in both Chat and Composer?

1 Like

Yes, exactly. If you @ some rules, the contents are executed as if you’d pasted the rules in to each message, so if you @ a file within your rule, it will be used as context in both the chat and composer.

2 Likes