Spaces:
Runtime error
Runtime error
Commit History
-
refactor: imporve message research agent
e6cf85e -
feat: platform-specific social media content drafting [ai]
Replace the short communication recommendation with a full platform-aware content draft. LinkedIn produces a 350-600 word post; Instagram produces a 5-6 slide carousel with title + body per slide; Twitter/X produces a 4-6 tweet thread. Platform and audience selectors sit side-by-side below the topic results. Each (query, audience, platform) combination is cached independently so switching platforms is instant after the first render.4dd8cf7 -
chore: rename app to TopicFlow, update tagline [ai]
70a03d1 -
feat: decouple audience selection from core pipeline [ai]
Split run_research_agent into run_core_pipeline (topic model, audience- independent) and run_communication_layer (followups + recommendation). Each is cached separately. Audience selector moves below the topic results so changing it only re-runs two cheap LLM calls, not the full pipeline.29ea6a7 -
feat: granular step progress via graph.stream() and st.status [ai]
Replace single blocking spinner with per-node st.status updates. run_research_agent now accepts an on_step callback and uses graph.stream() so each completed node emits its step message live. Caching moves from @st.cache_data to a session_state dict keyed by (query, audience, env) — same-query runs are instant, first runs show live progress.d253d8a -
feat: refactor pipeline as LangGraph agent with deterministic topic model and caching [ai]
Replaces the flat sequential pipeline with a LangGraph state machine that adds: - Research plan generation before fetching papers - Search quality inspection with automatic keyword refinement (up to 1 retry) - Science communication angle and follow-up question generation - Audience selector (general public, clinicians, researchers, etc.) - Agent workflow sidebar showing live step trace Topic model determinism: seed Python random and numpy before BERTopic, pin KMeans to random_state=42 and n_init=1. Full agent run is cached with @st.cache_data so the same query+audience never re-runs the pipeline. Linear fallback preserves identical logic when LangGraph is unavailable.89f5a1a -
fix: make topic model deterministic across runs [ai]
Cache _run_pipeline with @st.cache_data so repeated queries skip re-running LLM calls. Seed Python random and numpy before BERTopic fit_transform, and pin KMeans to n_init=1, random_state=42.4287c66 -
fix: single stable render path for results, remove inline rendering from run_query [ai]
5ace55a -
fix: use expander key to persist open state, decouple from papers toggle [ai]
75466b1 -
feat: use 6-month baseline period for richer period comparison [ai]
00f9321 -
refactor: correct grammar in placeholder message
6b6a41d -
fix: set temperature=0 on keyword extraction LLM call [ai]
7d1fd5f -
fix: include current month in date range, use today as end date [ai]
389e8eb -
fix: restore progressive display, show emerging topics as callout after comparison [ai]
3e70009
-
fix: render current period topics after comparison so emerging badges always show [ai]
2457b4e -
refactor: improve labels streamlit
daf75f6 -
fix: namespace topic toggle keys by period to avoid duplicate key error [ai]
16eb09e -
refactor: display current period results before starting previous period [ai]
Pipeline now runs and renders in three sequential steps so the user sees information as soon as it is ready: 1. Fetch + topic model current period → display current topics immediately 2. Fetch + topic model previous period 3. LLM comparison → display narrative, disappeared topics, previous topics On rerenders (toggling paper lists etc.) results are replayed from session state via render_period_comparison. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>e82d0f0 -
feat: compare current vs previous period topics to surface emerging research [ai]
Runs the full pipeline twice — current period (last N months) and the preceding N-month window — then uses an LLM to compare the two sets of topic summaries and identify what's emerging and what disappeared. UI shows: - Current period topics with a 🆕 badge on emerging ones - Narrative comparison ("what shifted between periods") - "No longer prominent" list of disappeared topics - Previous period topics in a collapsible section Changes: - open_alex: add previous_period_date_range() and get_openalex_papers_for_period() so fetch can target any explicit date window - topic_model_llm: add PeriodComparison model and compare_topic_periods() LLM call - streamlit_app: refactor around two-period pipeline; comparison result cached via @st.cache_data keyed on serialised summaries JSON Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>147c97e -
fix: show post-topic-filter document count in pipeline info message [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>676a1ea -
fix: improve pipeline info message clarity [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>97a13d0 -
refactor: load SBERT model once via st.cache_resource [ai]
semantic_rerank and run_topic_model now accept the model as an argument instead of loading it internally. A single @st.cache_resource function in streamlit_app.py owns the model lifecycle, so the cold load happens only once per server session regardless of how many queries are run. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>f946e69 -
feat: relax constraint on topic filtering
5120451 -
refactor: improve naming fetch papers function
dcecb4e -
feat: display fetch, rerank, and abstract counts in pipeline info [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>384e127 -
feat: semantic rerank top 200 from 500 fetched papers using SBERT [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>486a5f3 -
feat: filter irrelevant topics using LLM before summarization [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a7971e9 -
fix: correct buggy collapse of topics in streamlit
61ea8c1 -
fix: keep expander open when papers toggle is on [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>71c3100 -
feat: improve topic model top words
7df4176 -
refactor: improve streamlit interactivity
008f70c -
refactor: modular streamlit app with caching and session state [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>465f183 -
feat: make first frontend app
724b500 -
feat: improve prompt for keywords generation
c2f2cc9 -
fix: tighten prompt to prevent 'This topic' prefix in summaries [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>df36bfe -
refactor: pass client and model explicitly, constants from env vars [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>c0dfa9a -
feat: return TopicModelResult with model object and assignments [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>7d9b711 -
refactor: add run_topic_model wrapper, simplify playground script [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>04e1d4a -
feat: run topic model on OpenAlex abstracts from LLM query [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>91bad03 -
feat: add example for doing llm enhanced queries and topic model
c196a62 -
refactor: switch to custom provider, K=10, json_object mode [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>47f3eb5 -
feat: create topic model enhanced by llm
42d4122 -
feat: improve query expansion prompt
c1eeb41 -
refactor: improve llm script for prompt usage and openalex example
5312e51 -
feat: add LLM structured output to extract medical keywords [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>66eef28 -
feat: change 100 papers for 200 in openalex
6ecb55e -
feat: add pydantic to openalex results
e0305ed -
feat: expand openalex range
aaee481
-
fix: load dotenv lazily so OPEN_ALEX_KEY is read at call time [ai]
c4d63f0 -
feat: add openalex api integration for querying papers database
5a215b8