[HCR-235] 추천 api + 상품 임베딩 #20
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 사용자 프로필을 기반으로 상품을 추천하는 새로운 기능을 도입합니다. 이는 pgvector를 사용하여 상품 벡터 유사도를 검색하고, OpenAI의 대규모 언어 모델을 활용하여 각 추천 상품에 대한 설명을 생성함으로써 이루어집니다. 이로써 개인화된 상품 추천 경험을 제공하고, 추천 시스템의 확장성을 확보합니다. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This PR introduces a profile-based product recommendation API and a product embedding pipeline, utilizing OpenAI and pgvector for the new recommendation service. A critical prompt injection vulnerability was identified in the recommendation reason generation logic, where user-provided profile text is directly concatenated into the LLM prompt without sufficient sanitization or structural isolation. This must be addressed to ensure the reliability and safety of the LLM-generated content. Furthermore, the database update logic in the embedding script needs performance improvement, and dependency management should be made more stable. Please refer to specific file comments for detailed feedback.
📝작업 내용
👀변경 사항
api:
POST /api/v1/recommendations(member_id,profile_text)서비스: 프로필 임베딩 -> product 벡터 유사도 top k -> llm 추천 이유 생성
설정
Docker
🎫 Jira Ticket
#️⃣관련 이슈