Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
AI Signal Ranker
Rank news articles using multiple signals: novelty, velocity, relevance, and engagement.
CLI Quickstart
praisonai recipe run ai-signal-ranker \
--input '{"articles": [...], "top_n": 10}' \
--json
Use in Your App (SDK)
from praisonai.recipe import run, run_stream
result = run(
"ai-signal-ranker",
input={
"articles": articles_list,
"top_n": 10,
"weights": {
"novelty": 0.3,
"velocity": 0.2,
"relevance": 0.3,
"engagement": 0.2
}
}
)
# Direct tool usage
import sys
sys.path.insert(0, 'agent_recipes/templates/ai-signal-ranker')
from tools import rank_articles, calculate_novelty_score
ranked = rank_articles(articles, top_n=10)
{
"type": "object",
"properties": {
"articles": {"type": "array"},
"top_n": {"type": "integer", "default": 10},
"weights": {
"type": "object",
"properties": {
"novelty": {"type": "number"},
"velocity": {"type": "number"},
"relevance": {"type": "number"},
"engagement": {"type": "number"}
}
}
}
}
Output Schema
{
"ranked_articles": [
{
"title": "...",
"combined_score": 0.85,
"scores": {
"novelty": 0.9,
"velocity": 0.8,
"relevance": 0.85,
"engagement": 0.75
}
}
]
}
Signal Definitions
| Signal | Description |
|---|
| Novelty | How new/unique the topic is |
| Velocity | How fast the story is spreading |
| Relevance | Match to target keywords/topics |
| Engagement | Social engagement metrics |