Chapter 6: Document handling
This chapter introduces using a basic AI chatbot to prepare, summarize, convert, extract, and organize everyday IT documents more effectively.
After this chapter you will be able to
- AI document workflow overview. Describe how AI can improve an IT worker's document workflow when handling materials such as technical manuals, project reports, system logs, and support tickets.
- Core document handling tasks. State the practical document tasks the chapter covers: preparing documents for AI, summarizing long documents, converting file formats, extracting text from images, and managing document metadata and organization.
- Secure document sharing. Explain why company security policies must be checked before submitting documents to an AI tool, and state what kind of information should not be shared unless the platform is secure and approved.
- Document preparation and chunking. Describe how to prepare a large document for AI by extracting raw text, splitting it into clearly labeled 10- to 20-page segments, and using those chunks to manage tokens and improve processing precision.
- Explicit multi-shot prompting. Describe how to tell the AI exactly what to read and what output to produce, including planning for long responses; explain that for long documents, first requesting a summary and then asking focused questions gives the AI context for more accurate answers.
- Text extraction preparation. Describe text extraction as the step of getting text out of documents and preparing it before applying more advanced document-processing techniques.
- Explicit output formatting. Describe how to request a specific output format from an AI, such as bullet points, tables, or JSON, and explain why the format should be stated directly.
- Iterative document refinement. Trace the broad-to-narrow, step-by-step approach to document processing: begin with a broad request, then use follow-up prompts to focus on a smaller, relevant subset.
- Verification and chat continuation. Explain that AI document-processing output must be verified, with follow-up questions used to correct errors or investigate important points; describe starting a new chat and carrying over only essential context when token limits are reached.
- Human output verification. Explain why teams must verify AI-processed document output, including the risk that AI can hallucinate details or confuse information from different sources.
- Processing traceability and versioning. Describe how to maintain accountability and data integrity by recording the model, processing date, and verifier, and by securely retaining document versions with AI-processed sections clearly labeled.
- Sensitive-document handling controls. Explain the safeguards for sensitive documents: use company-approved tools, limit processing to necessary sections, favor models with clear deletion policies, keep processing in-house when possible, and use additional review steps where warranted.
- AI document summarization. Explain how an AI chatbot can turn a long document into a shorter overview that retains its important information, such as main points, methods, findings, and takeaways.
- Summary prompt tailoring. Describe how to tailor a summarization prompt to the audience and purpose, including requesting a high-level manager summary, a detailed technical brief, or a list of key points.
- AI format conversion benefits. Explain how AI can make common file-format conversions faster and less manual than traditional conversion tools, especially for documents with layouts or nested code.
- PDF-to-Markdown conversion prompt. Describe how to convert a formatted PDF for a team wiki by uploading it to AI and requesting well-formatted Markdown or HTML that preserves headings, lists, and tables, with descriptive placeholders for images.
- Conversion validation and instructions. Justify carefully verifying an AI-converted document and describe giving explicit instructions for special requirements such as image handling, complex layouts, or particular formatting.
- AI OCR for IT images. Explain how AI OCR converts text in screenshots, scans, whiteboard photos, and similar images into searchable, reusable text for IT tasks.
- Preserved error-message formatting. Describe how to prompt an AI tool to extract a screenshot's text while preserving its layout, including line breaks and special characters.
- AI document comparison value. Explain how AI-based document comparison improves on traditional diff tools for complex formats such as Word and PDF files. Describe how it can identify additions, modifications, and deletions and help reviewers focus on consequential updates.
- Focused comparison chunking. Describe the tradeoff between large model context windows and comparison accuracy. Explain why the section recommends comparing documents in smaller pieces, typically a few paragraphs at a time, even when a model can accept an entire large file.
- Comparison prompt specification. Apply a document-comparison prompt that states the document type, the versions to compare, the changes of interest, and the requested output format. Describe how asking for a Markdown change log with Major, Minor, and Editorial categories can make results actionable.
- Content-aware document tagging. Explain how AI-based document classification and tagging improves document retrieval compared with keyword-only search. State that AI uses a document's content and context to add relevant tags, helping avoid both missed files and overly broad search results.
- Gradual sorting system rollout. Describe a safe process for setting up automatic document sorting: test with sample documents, update the system for new document types, have people review important or sensitive documents, and observe document-use patterns. Explain why the section recommends starting with one department or document type and expanding only after problems are resolved.
- AI suitability for anonymization. Distinguish data that should not be anonymized with AI from less sensitive data for which approved AI may be considered. State that critical or regulated data should instead be handled manually by trained staff or with certified, approved compliance software.
- Approved anonymization environment. Describe the safeguards required before using AI for anonymization: security-team approval, compliance with company policies and regulations, testing on sample data, documented procedures, and a plan for edge cases. Identify approved enterprise solutions with access controls, auditing, and security integration as preferable to consumer or public AI tools.
- Consistent redaction instructions. Explain how to direct an approved AI tool to replace specified identifiers consistently while preserving the document's context, structure, and readability. State that the output must be reviewed for missed sensitive information, especially for critical or regulated data.
- AI technical translation. Explain why LLM-based translation can translate technical documents more effectively than simple word-for-word replacement. Describe how it uses learned mappings between languages, terms, and concepts to preserve meaning while producing localized documents.
- Translation prompt requirements. Describe how to prompt AI to translate a technical manual by naming the source and target languages and directing it to retain technical terminology and formatting. State that the prompt should ask the AI to flag terms or phrases requiring contextual or industry-specific human review.
- Translation quality control. Justify human review of AI-translated material, especially critical, complex, culturally sensitive, or industry-specific technical documents. Describe supplying a list of industry terms with approved translations to keep terminology consistent and reduce later editing.
- Technical report summary prompt. Describe a prompt that asks AI to produce a comprehensive summary of a 50-page technical report, covering its key findings, methodologies, and recommendations. State that the requested tone should be conversational and engaging while remaining business casual.
- Enterprise document handling safeguards. State that the enterprise document-handling prompt requests best practices for AI use with documents, specifically focusing on data privacy, security, and compliance.
What it builds on
- Chatbots and conversational AI (chapter 2) · The idea of using chatbots and conversational AI assistants.
- The mechanics of a good prompt (chapter 4) · The mechanics and principles of constructing an effective prompt.
- Data security with AI (chapter 1) · The earlier discussion of data security when using AI.
- Tokens (chapter 3) · The idea that AI processes text as tokens.
- Token limits (chapter 3) · Token limits that constrain how much document content can be processed at once.
- Key principles in prompt construction (chapter 4) · Key principles for constructing clear, specific prompts.
- Prompt chaining (chapter 4) · Prompt chaining as a way to perform work through sequential prompts.
- Recursive prompting (chapter 5) · Recursive prompting in practice.
Section by section
Introduction
This chapter introduces using a basic AI chatbot to prepare, summarize, convert, extract, and organize everyday IT documents more effectively.
- AI document workflow overview: Describe how AI can improve an IT worker's document workflow when handling materials such as technical manuals, project reports, system logs, and support tickets.
Why it matters: AI can reduce the effort of working through the large and varied document collections common in IT work. - Core document handling tasks: State the practical document tasks the chapter covers: preparing documents for AI, summarizing long documents, converting file formats, extracting text from images, and managing document metadata and organization.
Why it matters: Naming the available tasks helps you recognize where AI can save time in daily document work. - Document preparation for AI: Explain that documents should be prepared for AI processing in order to get better results from the chatbot.
Why it matters: The quality of the material given to AI affects how useful its document-processing output will be.
Key terms: document workflow, basic chatbot, AI processing, document preparation, document summarization, format conversion, text extraction, metadata, organization, prepare documents
6.1 Best practices for document handling with AI
This section establishes safe and effective practices for preparing documents and prompting AI tools to process them accurately.
- Secure document sharing: Explain why company security policies must be checked before submitting documents to an AI tool, and state what kind of information should not be shared unless the platform is secure and approved.
Why it matters: AI services may process your documents on external servers, so safe handling protects company data. - Document preparation and chunking: Describe how to prepare a large document for AI by extracting raw text, splitting it into clearly labeled 10- to 20-page segments, and using those chunks to manage tokens and improve processing precision.
Why it matters: Preparing manageable, identifiable text chunks helps the AI focus on content and work within token limits. - Explicit multi-shot prompting: Describe how to tell the AI exactly what to read and what output to produce, including planning for long responses; explain that for long documents, first requesting a summary and then asking focused questions gives the AI context for more accurate answers.
Why it matters: Clear instructions and an initial overview reduce vague output and help the AI answer later document questions more accurately.
Key terms: company security policies, external servers, confidential information, sensitive information, secure, approved platform, document preparation, 10- to 20-page segments, clear labels, token usage, raw text
6.1.1 Text extraction methods
This subsection identifies document text extraction as preparation for later AI document-processing tasks and notes using a chatbot in a separate session as the typical approach.
- Text extraction preparation: Describe text extraction as the step of getting text out of documents and preparing it before applying more advanced document-processing techniques.
Why it matters: Extracted, prepared text is the input needed for subsequent AI document-processing work. - Separate chatbot session: State that the typical approach described is to use the chatbot itself in a separate session for document text extraction.
Why it matters: Using a separate chatbot session is the specific workflow preference stated for this extraction task.
Key terms: text extraction, advanced document processing techniques, chatbot, separate session
6.1.2 Structuring and refining outputs
This section explains how to direct, refine, verify, and continue AI-assisted document-processing work effectively.
- Explicit output formatting: Describe how to request a specific output format from an AI, such as bullet points, tables, or JSON, and explain why the format should be stated directly.
Why it matters: Clear format requests make AI results easier to use directly in your work. - Iterative document refinement: Trace the broad-to-narrow, step-by-step approach to document processing: begin with a broad request, then use follow-up prompts to focus on a smaller, relevant subset.
Why it matters: Iterative refinement helps you work through large document sets without trying to ask for everything at once. - Verification and chat continuation: Explain that AI document-processing output must be verified, with follow-up questions used to correct errors or investigate important points; describe starting a new chat and carrying over only essential context when token limits are reached.
Why it matters: Verification catches AI errors, while selective context transfer lets you continue large or complex tasks efficiently.
Key terms: bullet points, tables, JSON, format requests, step-by-step process, start broad, follow-up questions, incident reports, verify, tokens
6.2 Ethics in AI document handling
This section explains how to use AI for document processing ethically through secure tool choices, human verification, traceable records, version control, and regular oversight.
- Model-specific privacy safeguards: Describe how AI document-processing tools differ in their privacy and safety approaches, and explain why organizations must choose tools and settings appropriate to the document’s sensitivity.
Why it matters: A tool that is acceptable for public documentation may be inappropriate for confidential organizational or patient data. - Human output verification: Explain why teams must verify AI-processed document output, including the risk that AI can hallucinate details or confuse information from different sources.
Why it matters: Plausible but false content in technical or sensitive documents can cause significant errors and undermine trust. - Processing traceability and versioning: Describe how to maintain accountability and data integrity by recording the model, processing date, and verifier, and by securely retaining document versions with AI-processed sections clearly labeled.
Why it matters: Traceable records make it possible to identify what AI changed, who checked it, and which version can be trusted. - Sensitive-document handling controls: Explain the safeguards for sensitive documents: use company-approved tools, limit processing to necessary sections, favor models with clear deletion policies, keep processing in-house when possible, and use additional review steps where warranted.
Why it matters: These controls reduce unnecessary exposure of confidential data while preserving the useful parts of AI-assisted processing. - Regular accuracy audits: Explain how regular audits and updated practices provide ongoing oversight by finding issues such as outdated AI-generated documentation before they damage accuracy or trust.
Why it matters: Continuous monitoring catches problems that initial review can miss as documents and AI technology change over time.
Key terms: Claude, ChatGPT, Gemini, Azure AI, AWS AI, Key Vault, verification, hallucinations, AI output, tracking
6.3 Document summarization
This section shows how to use AI prompts to create summaries at different levels of detail while recognizing that models may not reliably meet exact word counts.
- AI document summarization: Explain how an AI chatbot can turn a long document into a shorter overview that retains its important information, such as main points, methods, findings, and takeaways.
Why it matters: Summarization lets you understand lengthy or complex material faster without reading every word first. - Summary prompt tailoring: Describe how to tailor a summarization prompt to the audience and purpose, including requesting a high-level manager summary, a detailed technical brief, or a list of key points.
Why it matters: Specifying the desired summary style helps the same source material serve managers, technical teams, and quick-update needs. - Word-count limitations: State that AI models can follow language-oriented requests well but may fail to produce an exact requested word count, so a stated length should be treated as approximate and checked.
Why it matters: Checking length prevents an apparently precise AI summary from missing a formatting or communication requirement.
Key terms: document summarization, main points, methods, findings, takeaways, summarization prompts, high-level summary, detailed technical summary, key points, managers
6.4 Format conversion
This section shows how to use AI chatbots to convert documents between formats while preserving useful structure and verifying the results.
- AI format conversion benefits: Explain how AI can make common file-format conversions faster and less manual than traditional conversion tools, especially for documents with layouts or nested code.
Why it matters: AI-assisted conversion can reduce repetitive copy-paste work when you need content in a usable documentation format. - PDF-to-Markdown conversion prompt: Describe how to convert a formatted PDF for a team wiki by uploading it to AI and requesting well-formatted Markdown or HTML that preserves headings, lists, and tables, with descriptive placeholders for images.
Why it matters: This lets you reuse a formatted report in a wiki or documentation system without manually copying and rebuilding its structure. - Conversion validation and instructions: Justify carefully verifying an AI-converted document and describe giving explicit instructions for special requirements such as image handling, complex layouts, or particular formatting.
Why it matters: Clear requirements and post-conversion review help prevent formatting or content errors from reaching users.
Key terms: format conversion, AI-converted documents, nested code, PDF, Markdown, HTML, headings, lists, tables, verify
6.5 Text extraction from images
This section shows how AI-based OCR turns text in images into searchable, reusable text for IT work and how to improve extraction results.
- AI OCR for IT images: Explain how AI OCR converts text in screenshots, scans, whiteboard photos, and similar images into searchable, reusable text for IT tasks.
Why it matters: Extracted text can be searched, copied, and added to records instead of being manually retyped. - Preserved error-message formatting: Describe how to prompt an AI tool to extract a screenshot's text while preserving its layout, including line breaks and special characters.
Why it matters: Keeping the original structure of an error message makes the extracted result more useful for troubleshooting and documentation. - Extraction quality and improvement: Describe the image characteristics that improve AI text extraction and the steps to try when handwriting or complex layouts produce poor results.
Why it matters: Knowing how to improve difficult inputs helps you get more reliable text instead of accepting a weak OCR result.
Key terms: OCR, text extraction, searchable content, line breaks, special characters, formatting, error code, troubleshooting documentation, clear text, good contrast
6.6 Document comparison
This section shows how to use AI to compare document versions accurately and efficiently by chunking content when needed and specifying the changes and output that matter.
- AI document comparison value: Explain how AI-based document comparison improves on traditional diff tools for complex formats such as Word and PDF files. Describe how it can identify additions, modifications, and deletions and help reviewers focus on consequential updates.
Why it matters: AI comparison can reduce a lengthy manual review to a focused review of the changes that affect operations. - Focused comparison chunking: Describe the tradeoff between large model context windows and comparison accuracy. Explain why the section recommends comparing documents in smaller pieces, typically a few paragraphs at a time, even when a model can accept an entire large file.
Why it matters: Smaller, focused comparisons can make important differences easier for the AI to identify accurately. - Comparison prompt specification: Apply a document-comparison prompt that states the document type, the versions to compare, the changes of interest, and the requested output format. Describe how asking for a Markdown change log with Major, Minor, and Editorial categories can make results actionable.
Why it matters: A specific comparison request helps the AI prioritize the differences that matter to your work instead of returning an unfocused list.
Key terms: document comparison, diff tools, machine learning, version control, added, modified, context windows, larger files, smaller sections, few paragraphs
6.7 Document classification and tagging
This section explains how AI classifies and tags documents by content and context, and how to introduce automated sorting safely and gradually.
- Content-aware document tagging: Explain how AI-based document classification and tagging improves document retrieval compared with keyword-only search. State that AI uses a document's content and context to add relevant tags, helping avoid both missed files and overly broad search results.
Why it matters: Content-aware tags can make growing document collections easier to search and manage. - Document AI implementation options: Describe the two main ways companies use AI for document management: custom AI built with APIs and ready-to-use AI services. Identify that ready-made options include Azure AI Document Intelligence, Google Cloud Document AI, Amazon Textract, and customizable OpenAI GPT models, and that such services can process many documents at once.
Why it matters: Knowing the available approaches helps an organization choose between building a tailored solution and adopting an existing service. - Gradual sorting system rollout: Describe a safe process for setting up automatic document sorting: test with sample documents, update the system for new document types, have people review important or sensitive documents, and observe document-use patterns. Explain why the section recommends starting with one department or document type and expanding only after problems are resolved.
Why it matters: A phased rollout reduces classification mistakes and user confusion before automation reaches the whole organization. - Secure enterprise service selection: State the security and compliance considerations for AI sorting of sensitive data: use enterprise services that meet company privacy requirements and look for data protection, audit logs, and an option to run in a secure internal setup.
Why it matters: Document-sorting convenience is not worth exposing sensitive company data or violating compliance requirements. - Classification prompt applications: Describe the role of the section's example prompts as practice for sorting and tagging IT documents, including tasks involving technical manuals and project files.
Why it matters: Trying task-specific prompts is a practical way to see how AI classification and tagging works on IT documents.
Key terms: document classification, tagging, content, context, keyword search, custom AI, APIs, ready-to-use AI services, Microsoft Azure AI Document Intelligence, Google Cloud Document AI
6.8 Document anonymization
This section explains how to anonymize documents safely by deciding when AI is inappropriate, using approved tools and controls where it is appropriate, and reviewing results for missed sensitive data.
- AI suitability for anonymization: Distinguish data that should not be anonymized with AI from less sensitive data for which approved AI may be considered. State that critical or regulated data should instead be handled manually by trained staff or with certified, approved compliance software.
Why it matters: Choosing the wrong anonymization method can expose regulated or highly sensitive information. - Approved anonymization environment: Describe the safeguards required before using AI for anonymization: security-team approval, compliance with company policies and regulations, testing on sample data, documented procedures, and a plan for edge cases. Identify approved enterprise solutions with access controls, auditing, and security integration as preferable to consumer or public AI tools.
Why it matters: Approval, controls, and testing reduce the chance that anonymization itself becomes a data-security incident. - Consistent redaction instructions: Explain how to direct an approved AI tool to replace specified identifiers consistently while preserving the document's context, structure, and readability. State that the output must be reviewed for missed sensitive information, especially for critical or regulated data.
Why it matters: Specific replacement rules and human review help make shared documents useful without leaving identifiable information behind. - Residual reidentification risk: State that anonymization is not perfect because someone may be able to reconstruct original identities from large or complex data sets. Explain that teams must assess risk and prioritize security and compliance even when automation makes sharing or test-data creation faster.
Why it matters: Masked fields do not guarantee that a person cannot be identified from the remaining data.
Key terms: critical data, regulated data, HIPAA, GDPR, manual anonymization, specialized compliance software, enterprise AI solution, Azure OpenAI Service, Amazon AWS Bedrock, access controls
6.9 Language translation
This section shows how to use LLM-based AI to translate technical documents efficiently while preserving terminology and formatting and retaining human review for uncertain or critical content.
- AI technical translation: Explain why LLM-based translation can translate technical documents more effectively than simple word-for-word replacement. Describe how it uses learned mappings between languages, terms, and concepts to preserve meaning while producing localized documents.
Why it matters: This helps you use AI to reduce the time and effort required to localize documents for international teams and clients. - Translation prompt requirements: Describe how to prompt AI to translate a technical manual by naming the source and target languages and directing it to retain technical terminology and formatting. State that the prompt should ask the AI to flag terms or phrases requiring contextual or industry-specific human review.
Why it matters: A specific translation prompt helps preserve the parts of a technical document that users rely on while exposing uncertain language for review. - Translation quality control: Justify human review of AI-translated material, especially critical, complex, culturally sensitive, or industry-specific technical documents. Describe supplying a list of industry terms with approved translations to keep terminology consistent and reduce later editing.
Why it matters: Review and approved terminology prevent a fast translation from introducing errors or inconsistent language into important documents.
Key terms: AI translation, large language models (LLMs), technical translation, localized documents, technical terminology, formatting, human review, context, industry-specific meaning, specialized terms
6.10 Prompts used in this chapter
This section provides example prompts for summarizing technical reports, reviewing technical translation practices, and identifying secure enterprise document-handling practices.
- Technical report summary prompt: Describe a prompt that asks AI to produce a comprehensive summary of a 50-page technical report, covering its key findings, methodologies, and recommendations. State that the requested tone should be conversational and engaging while remaining business casual.
Why it matters: A well-scoped summary prompt helps turn a long technical report into an accessible account of its most important content. - Translation best-practice inquiry: Describe the prompt that asks for considerations when using AI to translate technical documentation between languages and requests a list of best practices. Explain that the prompt is meant to elicit guidance, rather than directly perform a translation.
Why it matters: Asking for translation considerations can help an IT professional use AI more thoughtfully with multilingual technical documentation. - Enterprise document handling safeguards: State that the enterprise document-handling prompt requests best practices for AI use with documents, specifically focusing on data privacy, security, and compliance.
Why it matters: Privacy, security, and compliance are essential safeguards when AI handles enterprise documents.
Key terms: comprehensive summary, key findings, methodologies, recommendations, business casual, technical documentation, translating, between languages, best practices, enterprise settings
6.11 Summary
This summary recaps how LLMs improve document processing, transformation, extraction, translation, governance, and security for IT work.
Where this is used later
- Setting up the environment (chapter 8) · Methods for extracting text from documents for AI use.
- Teaching an old DBA new tricks (chapter 10) · Ways to supply and extract text for AI document handling.
- Analyzing error logs: Identifying exceptions and failures (chapter 9) · AI analysis of error logs requires checking outputs for errors and omissions.
- Managing large files (chapter 12) · Managing large files depends on handling context and token constraints.
- AI-enhanced email summarization and drafting (chapter 7) · Using AI to create summaries of source material.
- Not ready for prime time (chapter 7) · Using AI to summarize documents and recognizing the practical limits of summarization.
- Meeting transcription and recap with AI (chapter 7) · Using AI to summarize source material
- Prompts used in this chapter (chapter 9) · Using AI to convert content into a needed format
Concepts explained in this chapter
- conversational aiConversational AI is artificial intelligence that supports ongoing dialogue by interpreting user messages and generating context-aware responses.
- authorizationAccess control is the restriction and management of who or what may access systems, data, or resources and which actions they may perform.
- securityCybersecurity is the practice of protecting digital systems, networks, applications, and data from threats and unauthorized activity.
- enterprise AI planAn enterprise AI solution is an artificial-intelligence service or system deployed with organizational security, governance, and access controls.
- versioningVersion control is the management of successive states of files or other artifacts, including their changes and history.
- data integrityData integrity is the preservation of data's accuracy, consistency, completeness, and trustworthy state throughout its lifecycle.
- privacyPrivacy is the protection of individuals' or organizations' information and control over how it is collected, accessed, and used.
- verificationVerification is the process of checking an artifact or result against evidence or requirements to establish its accuracy or validity.
- many-shot promptingMulti-shot prompting is a prompting strategy that uses multiple sequential interactions or examples to guide an AI model toward a result.
- step-by-step processA step-by-step process is a procedure that performs a task through an ordered sequence of progressively focused stages.
- promptA prompt is an instruction or input supplied to an AI system to elicit a specified response or output.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
