Skip to content

[expert-finder] 3 - JSON system prompt, helpers, v2 run + Celery task, excluded search IDs#3364

Merged
nicktytarenko merged 11 commits intomainfrom
expert-finder-v2/json-llm-service-and-task
May 7, 2026
Merged

[expert-finder] 3 - JSON system prompt, helpers, v2 run + Celery task, excluded search IDs#3364
nicktytarenko merged 11 commits intomainfrom
expert-finder-v2/json-llm-service-and-task

Conversation

@nicktytarenko
Copy link
Copy Markdown
Contributor

What?

  • expert_finder_system_v2.txt defines the v2 output JSON shape
  • We’re creating a parallel path#2 alongside the existing Expert Finder flow (not wired to any endpoint yet)
    • Added a separate ExpertFinderServiceV2.process_expert_search_v2 to use the new prompt and parsing logic

@nicktytarenko nicktytarenko requested a review from a team as a code owner April 24, 2026 08:51
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.


logger = logging.getLogger(__name__)

V2_PROMPT_EXPERT_RESERVE_PCT = 0.1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment here for this magic number here, I know there's one in _prompt_expert_count_for_round but that could move and is indirect

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I second the sonarqube comment Define a constant instead of duplicating this literal "All States" 4 times.


batch = [r for r in kept if not self._expert_row_suggests_deceased(r)]

batch = self._dedupe_experts_by_normalized_email(batch)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dedupe is happening within the for loop, is it possible this will cause repeats across batches?

Base automatically changed from expert-finder-v2/expert-helper-services-v3 to main May 7, 2026 18:50
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 7, 2026

Comment thread src/research_ai/tasks.py
task_self.update_state(
state="PROGRESS", meta={"progress": percent, "status": message}
)
except Exception:
@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

❌ Patch coverage is 68.47826% with 87 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.47%. Comparing base (3d9115d) to head (4a939dc).

Files with missing lines Patch % Lines
src/research_ai/services/expert_finder_v2.py 68.32% 51 Missing ⚠️
src/research_ai/tasks.py 60.93% 25 Missing ⚠️
src/research_ai/prompts/expert_finder_prompts.py 65.21% 8 Missing ⚠️
...c/research_ai/services/report_generator_service.py 86.66% 2 Missing ⚠️
src/research_ai/services/expert_display.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3364      +/-   ##
==========================================
- Coverage   79.52%   79.47%   -0.06%     
==========================================
  Files         642      643       +1     
  Lines       37387    37635     +248     
==========================================
+ Hits        29733    29909     +176     
- Misses       7654     7726      +72     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nicktytarenko nicktytarenko merged commit a3ebeef into main May 7, 2026
5 of 7 checks passed
@nicktytarenko nicktytarenko deleted the expert-finder-v2/json-llm-service-and-task branch May 7, 2026 19:01
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