-
Notifications
You must be signed in to change notification settings - Fork 4
Integrate recommendation backend #504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
accc0d5 to
e99a79b
Compare
bigabig
requested changes
Feb 19, 2025
backend/src/app/core/data/classification/document_classification_service.py
Show resolved
Hide resolved
backend/src/app/core/data/classification/document_classification_service.py
Outdated
Show resolved
Hide resolved
Member
|
DocumentTagRecomendation sollte DocumentTagRecommendationJob heißen? |
bigabig
reviewed
Feb 19, 2025
bigabig
requested changes
Feb 20, 2025
backend/src/alembic/versions/523e193d91a0_add_document_tag_recommendation.py
Outdated
Show resolved
Hide resolved
fynnos
reviewed
Feb 25, 2025
Collaborator
fynnos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good already! added a few comments regarding DB operations
backend/src/app/core/data/classification/document_classification_service.py
Outdated
Show resolved
Hide resolved
backend/src/app/core/data/classification/document_classification_service.py
Outdated
Show resolved
Hide resolved
bigabig
approved these changes
Feb 28, 2025
noahscheld
pushed a commit
that referenced
this pull request
Mar 3, 2025
* implement tag-recommendation data model * implement crud and dto * implement dummy classification * document tag recommendation * update alembic version * remove faulty alembic version * Address Tims findings * update None value query * revert changes * remove dto transformation --------- Co-authored-by: Dominik Martens <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces the Document Tag Recommendation backend, which suggests tags for untagged documents by identifying similar documents with existing tags.
Main Functionalities
Three primary functionalities are added as API endpoints, extending through the service, CRUD, DTO, and ORM layers:
1️⃣ create_new_doc_tag_rec_task
Starts a Celery job that utilizes simsearch and Weaviate to compare document vectors.
Documents with high similarity are assumed to share tags.
The recommendations are stored in PostgreSQL for later retrieval.
2️⃣ get_recommendations_from_task_endpoint
Fetches recommended tags for untagged source documents using a task ID.
Each recommendation includes metadata and can be displayed to users in the frontend.
3️⃣ update_document_tag_recommendations
Accepts suggested tags by updating the document records in the database.
Takes a list of recommendation_ids, setting is_accepted = true for each.
Links the confirmed tags to their respective documents.
backend/src/api/document_tag_recommendations.py → Implements the three new endpoints.
Let me know if any refinements are needed!