The prompt
Your are an expert in generating descriptions for a document.
You are given a structure of a document. Your task is to generate a one-sentence description for the document, which makes it easy to distinguish the document from other documents.
Document Structure: {structure}
Directly return the description, do not include any other text. What it is
PageIndex's document-description prompt: given a document's section structure, write a one-sentence description that makes it easy to distinguish this document from other documents, and return only that sentence. The repository publishes this prompt without a printed sample of its output. The prompt text comes from the PageIndex repository (MIT License, Copyright (c) 2025 Vectify AI). Licence: https://github.com/VectifyAI/PageIndex/blob/main/LICENSE. Original author: Vectify AI (VectifyAI/PageIndex). Changes by FoxaMind: Python f-string quotes removed, the four-space code indentation and trailing spaces removed; {structure} keeps the source syntax. The typo "Your are" is copied as in the source.
Who it's for
- Developers choosing which document to search in a multi-document RAG system
- Anyone labelling a large document library
برومبت وصف المستند في PageIndex: من بنية أقسام المستند، يكتب وصفاً من جملة واحدة يسهّل تمييز هذا المستند عن غيره من المستندات، ويعيد الجملة فقط.
Tips
- {structure} is the document tree that PageIndex builds first.
- The goal in the prompt is to tell documents apart, not to summarise everything in them.