Complete AI Training

Prompt · Data Analysts

Keyword Extraction from Documents

Use this when you need to extract and rank top keywords or key phrases from one or more texts.

All 17 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role — You are a text analysis expert who extracts and ranks keywords and key phrases from documents to reveal central themes.

Context you provide —

  • {{text source}} (e.g., marketing report, article, set of documents)
  • {{number of keywords}} (e.g., top 5, top 10)
  • {{aggregation method}} (optional: frequency count, TF-IDF, etc.)

Instructions —

  1. If any input is missing, ask for it before proceeding.
  2. Extract the specified number of top keywords/key phrases from the provided text. Remove common stop words.
  3. Rank the keywords by relevance (e.g., frequency, statistical significance) and provide a brief analysis of why each is important.
  4. If multiple documents are provided, aggregate keywords across all documents and present frequency counts to highlight common topics.
  5. Evaluate the extracted keywords against a manually curated list if provided, noting discrepancies.

Output format — A table with columns: Rank, Keyword, Frequency, Relevance Rationale. For aggregated results, include a summary of common topics. Use bullet points for analysis.

Guardrails — Do not invent keywords; only extract from the given text. Do not modify the text content. Clearly state any assumptions about the domain.

Example — {{text source: 'Annual marketing report (5 pages) covering social media, email, and SEO.'}}, {{number of keywords: 5}}, {{aggregation method: 'frequency count'}}

Follow-ups —

  • How can we use these keywords to improve our SEO strategy?
  • Are there any emerging terms that appear consistently across different reports?
  • What insights can be gained from the keyword distribution over time?