Generate initial profile from user input Args: user_input: User's research description Returns: Profile JSON
(user_input: str)
| 14 | |
| 15 | |
| 16 | def generate_profile(user_input: str) -> dict: |
| 17 | """ |
| 18 | Generate initial profile from user input |
| 19 | |
| 20 | Args: |
| 21 | user_input: User's research description |
| 22 | |
| 23 | Returns: |
| 24 | Profile JSON |
| 25 | """ |
| 26 | now = datetime.now().isoformat() |
| 27 | |
| 28 | # Parse user input and generate profile |
| 29 | # User said: "多模态推理的方向,关注多模态方向的论文" |
| 30 | |
| 31 | profile = { |
| 32 | "user_id": "user_001", |
| 33 | "version": "0.1", |
| 34 | "created_at": now, |
| 35 | "updated_at": now, |
| 36 | "core_directions": { |
| 37 | "Multimodal Reasoning": 0.85, |
| 38 | "Multimodal Learning": 0.80, |
| 39 | "Vision-Language Models": 0.75, |
| 40 | "Cross-modal Understanding": 0.70 |
| 41 | }, |
| 42 | "methodology_preferences": { |
| 43 | "preference_data_driven_over_theory": True, |
| 44 | "preference_systematic_work_over_incremental": True, |
| 45 | "preference_open_source_code": True, |
| 46 | "preference_multimodal_application": True |
| 47 | }, |
| 48 | "must_read": { |
| 49 | "authors": [], |
| 50 | "institutions": [], |
| 51 | "keywords": ["multimodal", "reasoning", "vision-language"] |
| 52 | }, |
| 53 | "topic_weights": { |
| 54 | "multimodal-reasoning": 0.85, |
| 55 | "multimodal-learning": 0.80, |
| 56 | "vision-language": 0.75, |
| 57 | "cross-modal": 0.70 |
| 58 | }, |
| 59 | "author_heat": {}, |
| 60 | "institution_heat": {}, |
| 61 | "interest_vector": [0.0] * 768, # Will be updated from feedback |
| 62 | "taste_profile": { |
| 63 | "preferred_work_type": ["empirical", "multimodal", "reasoning"], |
| 64 | "dispreferred_work_type": ["single_modality", "incremental"] |
| 65 | }, |
| 66 | "reading_history": [], |
| 67 | "behavior_logs_summary": { |
| 68 | "total_pushes": 0, |
| 69 | "total_selected": 0, |
| 70 | "total_skipped": 0, |
| 71 | "selection_rate": 0.0 |
| 72 | } |
| 73 | } |