Repository navigation
Scenario 2 Content Processing
Martin Schultheiss edited this page Nov 25, 2025
·
1 revision
Learn how to analyze and improve content using Context Processor's pre-processing strategies.
This scenario demonstrates:
- Applying individual strategies (Clarify, Analyze, Search, Fetch)
- Comparing strategy outputs
- Combining strategies for comprehensive analysis
- Processing different content types
- Using results for improvement
Time: ~10 minutes | Complexity: Intermediate
You have various content that needs analysis:
- Blog posts that need clarity improvement
- Articles requiring SEO optimization
- Content with external references
- Documents needing structural analysis
Detects and reports on:
- Vague language and generic terms
- Passive voice usage
- Ambiguous pronouns
- Clarity score (0-100)
Use when: You want to improve readability
Provides metrics on:
- Word count and reading time
- Sentence complexity
- Average word length
- Readability metrics
Use when: You need content metrics
Generates:
- Ranked keywords
- Topic extraction
- SEO-relevant terms
Use when: You want content to be discoverable
Detects:
- URLs and links
- External references
- URL types
Use when: You have content with links
const blogPost = `
The importance of testing your code is something that cannot be overstated.
Tests ensure the code works correctly. Test strategies include unit, integration, and e2e tests.
Learn more at https://testing-library.io and https://jest.io
`;
// Get different perspectives
const clarity = processor.analyzeContent(blogPost, "clarify");
const keywords = processor.analyzeContent(blogPost, "search");
const analysis = processor.analyzeContent(blogPost, "analyze");
const urls = processor.analyzeContent(blogPost, "fetch");
console.log("Clarity Score:", clarity.clarity_score);
console.log("Top Keywords:", keywords.keywords);
console.log("Reading Time:", analysis.reading_time_minutes, "min");
console.log("URLs Found:", urls.urls.length);if (clarity.clarity_score < 50) {
console.log("⚠️ This content needs clarity improvements");
console.log("Suggestions:", clarity.suggestions);
}const saved = processor.save({
title: "Testing Best Practices",
content: blogPost,
tags: ["testing", "best-practices"]
}, "comprehensive"); // Applies clarify + analyze + search
console.log("Content saved with full analysis!");| Strategy | Use Case | Output |
|---|---|---|
| Clarify | Improve readability | Clarity score, vague words |
| Analyze | Content metrics | Word count, complexity, reading time |
| Search | SEO & discoverability | Keywords, topics, tags |
| Fetch | External references | URLs, link types |
| Comprehensive | Everything | All of the above |
✅ Analyze - Understand content from multiple angles
✅ Improve - Use suggestions to enhance content
✅ Optimize - Make content discoverable and clear
✅ Automate - Process content at scale
✅ Compare - Apply different strategies for different needs
- Try Scenario 3 - Advanced workflows
- Review API Reference
- Check Troubleshooting
Ready to dive deeper? Check out Scenario 3 for advanced workflows!