Skip to content

add timeline clustering using agentic method#5

Open
sayantan11995 wants to merge 2 commits intocomplementizer:masterfrom
sayantan11995:claude/add-timeline-clustering-oPlsK
Open

add timeline clustering using agentic method#5
sayantan11995 wants to merge 2 commits intocomplementizer:masterfrom
sayantan11995:claude/add-timeline-clustering-oPlsK

Conversation

@sayantan11995
Copy link
Copy Markdown

No description provided.

Replace the extractive summarization and timeline construction steps of the
classical 'clust' method with a multi-agent LLM pipeline orchestrated by
LangGraph. The new 'agentic_clust' method keeps clustering and ranking
unchanged but routes each cluster through:

  classify_topic -> generate_summaries -> judge_summaries ->
  verify_summaries -> finalize_timeline

Judging criteria are topic-type-aware (disaster, organization, person, etc.)
so that, e.g., a disaster timeline prioritizes impact/casualties/response
while an organization timeline prioritizes decisions/leadership/milestones.

https://claude.ai/code/session_01HsFAvdgJrD2KYysfxK2Vs2
Replace ChatOpenAI (gpt-4o-mini) with ChatOllama (llama3.1:8b) as the
default LLM.  Key changes:

- Default LLM is now langchain_ollama.ChatOllama with model=llama3.1:8b
- Ollama's format="json" mode enabled to constrain output to valid JSON
- Added _invoke_llm_json() retry helper: smaller models occasionally
  produce malformed JSON, so it retries up to 2 times with a corrective
  re-prompt
- classify_topic now uses JSON output ({"category": "..."}) for
  consistency with the JSON-mode constraint
- langchain-openai replaced with langchain-ollama in requirements.txt

Prerequisite: ollama pull llama3.1:8b

https://claude.ai/code/session_01HsFAvdgJrD2KYysfxK2Vs2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants