[expert-finder] 3 - JSON system prompt, helpers, v2 run + Celery task, excluded search IDs#3364
Conversation
…, excluded search IDs
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…count calculation
…github.com/ResearchHub/researchhub-backend into expert-finder-v2/json-llm-service-and-task
…github.com/ResearchHub/researchhub-backend into expert-finder-v2/json-llm-service-and-task
…ated imports. Introduce personal_name_for method for improved name handling. Update usages in expert_finder_v2 and report_generator_service.
…sk input processing.
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
||
| V2_PROMPT_EXPERT_RESERVE_PCT = 0.1 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Dedupe is happening within the for loop, is it possible this will cause repeats across batches?
…e deduplication process and streamline round handling.
…github.com/ResearchHub/researchhub-backend into expert-finder-v2/json-llm-service-and-task
…kend into expert-finder-v2/json-llm-service-and-task
|
| task_self.update_state( | ||
| state="PROGRESS", meta={"progress": percent, "status": message} | ||
| ) | ||
| except Exception: |
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|



What?
expert_finder_system_v2.txtdefines the v2 output JSON shapeExpertFinderServiceV2.process_expert_search_v2to use the new prompt and parsing logic