add timeline clustering using agentic method#5
Open
sayantan11995 wants to merge 2 commits intocomplementizer:masterfrom
Open
add timeline clustering using agentic method#5sayantan11995 wants to merge 2 commits intocomplementizer:masterfrom
sayantan11995 wants to merge 2 commits intocomplementizer:masterfrom
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.