AI Smart Filtering
AI Smart Filtering is TrendRadar's advanced filtering feature. Unlike traditional keyword matching, you only need to describe your interests in natural language, and the AI automatically understands them and screens out the news you truly care about.
How it works
AI Smart Filtering works in four steps:
Describe your interests
In
config/ai_interests.txt, write down what you care about in natural language, for example "I want to see news about AI and new energy."The AI extracts tags
The AI automatically extracts structured interest tags from your description, to be used for matching and scoring later.
Batch scoring
The AI matches each news item against the extracted interest tags and assigns a relevance score from 0 to 1.
Threshold filtering
Only news that reaches the
min_score threshold is pushed; anything below the threshold is filtered out.How to enable
Enabling AI Smart Filtering takes just two steps: write the interest description file, then edit the configuration file.
1. Write your interest description
Edit the
config/ai_interests.txt file and describe what you care about in natural language. No special syntax is required — just write a paragraph as if explaining it to a friend.ai_interests.txt example
我对以下领域感兴趣:
1. AI 技术发展动态,包括大模型、AI Agent、AI 应用落地
2. 电动汽车市场趋势,特别是特斯拉、比亚迪等头部品牌的动向
3. 中国重大政策变化,尤其是经济和科技政策
4. 半导体芯片行业的技术突破和产业链变动Any language works
The interest description can be written in any language — Chinese, English, or a mix. The AI will understand your intent automatically.
Title quality requirements
Besides defining what you want to see, you can also define what you don't want to see at the end of
ai_interests.txt. For example, add requirements like "no clickbait" or "no advertorials", and the AI will take them into account — even if a title matches your interest tags, it may be scored lower or filtered out if it doesn't meet the quality criteria.2. Edit the configuration file
In
config/config.yaml, switch the filtering method to AI mode and set the score threshold:filter:
method: ai # switch to AI filtering (the default is keyword filtering)
ai_filter:
min_score: 0.7 # minimum score threshold (0-1); news below this score is not pushedThe higher the
min_score, the stricter the filtering — fewer news items are pushed, but they are more relevant. We suggest starting at 0.7 and adjusting based on the actual results.The final number of pushed items is also affected by
report.mode. In incremental mode only new content is pushed; in current mode only items currently on the charts are pushed.| Threshold range | Effect | Best for |
|---|---|---|
| 0.3-0.4 | Loose filtering; most news gets through | You don't want to miss anything possibly relevant |
| 0.5-0.6 | Moderate filtering; keeps clearly relevant news | The recommended choice for most users |
| 0.7-0.8 | Strict filtering; keeps only highly relevant content | You only want the most essential news |
| 0.9-1.0 | Extremely strict; may leave very few items pushed | Generally not recommended to set it this high |
Core features
Advanced configuration
The settings below all have sensible defaults and usually don't need to be changed. If you want to fine-tune the AI filtering behavior, set them in the
ai_filter section of config.yaml:| Setting | Default | Description |
|---|---|---|
batch_size | 200 | Number of titles sent to the AI per batch |
batch_interval | 2 | Interval between batches (seconds), to avoid overly frequent requests |
reclassify_threshold | 0.6 | Threshold for triggering a full reclassification (0-1); lower values lean toward full reclassification (more accurate but uses more tokens) |
interests_file | (default) | Custom interest description filename, placed in the config/custom/ai/ directory. For example, "finance.txt" loads config/custom/ai/finance.txt |
Related global settings
| Setting | Default | Description |
|---|---|---|
filter.priority_sort_enabled | true | Tag sorting method in AI mode. true = sort by the order defined in the interest description, false = sort by the number of matched items (most first) |
Model configuration
AI Smart Filtering shares its model configuration with AI Analysis Push. If you have already configured
AI_API_KEY and AI_MODEL for AI analysis, AI filtering reuses them directly — no need to configure them again.Configure once, use in both places
Configure
api_key and model once in the ai section of config.yaml, and both AI Analysis Push and AI Smart Filtering will use the same configuration. For detailed model configuration instructions, see the "AI Analysis Push" chapter.AI filtering vs. keyword filtering
Each filtering method has its own strengths. You can choose based on your situation, or mix them by time period.
| Aspect | Keyword filtering (keyword) | AI filtering (ai) |
|---|---|---|
| Configuration | Write keyword rules (supports advanced syntax such as regex and grouping) | Describe your interests in natural language, with no special syntax to learn |
| Matching precision | Exact matching, but easily misses relevant content worded differently | Semantic matching that understands synonyms and contextual connections |
| Speed | Milliseconds, virtually no delay | Requires API calls, so it takes some time |
| Cost | Zero cost | Consumes API usage quota (usually very little) |
| Learning curve | Requires learning keyword syntax (aliases, regex, grouping, etc.) | Just write a few sentences — zero learning curve |
Which to choose
If you don't want to spend time maintaining a keyword list, or the topics you follow change often, AI filtering is the better choice. If you need precise control (for example, only pushing news that contains a specific company name), keyword filtering is more suitable.