Skip to main content
The more context and details you add, the better your response because the model understands precisely what you expect. Do not miss our Prompt Engineering Guide to learn how to write great prompts.
Document search lets you work with uploaded files directly in your conversations. When you attach documents, the AI can extract text, search for specific information, and answer questions based on the actual content.

How to add documents

You can add documents to a chat in several ways:
  1. Upload directly - Click the + button and select Upload file, or drag and drop files into the chat
  2. From integrations - Click the + button, then Select file to choose from connected services like Google Drive, OneDrive, or SharePoint (learn how to set up integrations)
  3. Paste from clipboard - Paste files directly into the chat input

How document search works

When you attach a document, Langdock automatically processes it:
  1. Text extraction - Content is extracted from your files (PDFs, Word docs, presentations, etc.)
  2. Chunking - Long documents are split into manageable sections
  3. Embedding - Text chunks are converted into vector embeddings for semantic search
  4. Context injection - Relevant content is sent to the AI along with your prompt

Search modes

The AI uses document search in three different ways:
ModeWhen it’s usedExample
Full retrievalWhen the AI needs complete document content”Summarize this entire document”
Targeted searchWhen searching for specific info in known documents”Find the pricing section in the proposal”
Cross-document searchWhen searching across all attached documents”What do these contracts say about termination?”

Viewing specific pages

For documents where layout matters (PDFs with figures, tables, or diagrams), the model can view pages as visual screenshots. When you upload a PDF:
  • For shorter PDFs: All pages are automatically captured as screenshots
  • For longer PDFs: A selection of pages from the beginning, middle, and end are captured initially
You can ask the model to view additional pages on demand using the page viewer. This is especially useful when:
  • The document contains figures or charts
  • You need to see table formatting
  • You ask the model to “look at” or “check” a specific part
The page viewer displays a range of pages per request. For longer sections, the model will make multiple requests.

Supported file types

Langdock supports PDFs, Word documents, PowerPoints, spreadsheets, images, audio files, and more. For the complete list with size limits, see supported file types.
Text-based files have an 8 million character limit alongside file size limits. A large PDF might hit the character limit before the size limit.

Use cases

Summarization
  • “Summarize the key points from this report”
  • “Give me a one-paragraph summary of each attached document”
Question answering
  • “What are the payment terms in this contract?”
  • “According to this research paper, what were the main findings?”
Analysis and comparison
  • “Compare the pricing across these three proposals”
  • “What are the differences between these two policy documents?”
Extraction
  • “Extract all dates and deadlines mentioned in this document”
  • “List all the people mentioned in these meeting notes”

Limitations

Table extraction isn’t fully reliable for complex tables. For better results with tabular data:
  • Use the Data Analyst tool with CSV or Excel files
  • Connect to Google Sheets or Excel via integrations
  • Take a screenshot of the table and upload it as an image
Current limitations:
  • Complex table structures may not extract accurately
  • Images and graphs embedded in documents aren’t extracted during text processing, but you can ask the model to view them via the page viewer which displays page screenshots
  • Handwritten text or scanned documents with poor OCR quality may have extraction errors
  • Password-protected files cannot be processed

Best practices

For better results:
  • Be specific about what you’re looking for
  • Reference document names when you have multiple files
  • Ask the AI to quote directly from the source when accuracy matters
  • For long documents, start with a summary request to understand the structure
Working with multiple documents:
  • You can attach up to 20 documents in a single conversation
  • Name your files descriptively so the AI can reference them clearly
  • When comparing documents, explicitly state which documents to compare
For integration files:
  • Ensure you have an active connection to the service
  • The AI will prompt you to connect if access is needed
  • File permissions from the source service are respected