-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Multimodal feature for confluence (image summaries only) #3208
Draft
nisi99
wants to merge
100
commits into
danswer-ai:main
Choose a base branch
from
nisi99:multimodal_feature_image_summaries_only
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Multimodal feature for confluence (image summaries only) #3208
nisi99
wants to merge
100
commits into
danswer-ai:main
from
nisi99:multimodal_feature_image_summaries_only
+678
−5
Conversation
This file contains 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
fix mypy issues and remove tbd images
add gliffy images, ignore videos, use async openai
…image_summaries_only
…image_summaries_only
@nisi99 is attempting to deploy a commit to the Danswer Team on Vercel. A member of the Team first needs to authorize it. |
nisi99
changed the title
Multimodal feature image summaries only
Multimodal feature for confluence (image summaries only)
Nov 22, 2024
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.
Description
Adds multimodal functionality to the Confluence connector: extracts all images that are in the attachment of a confluence page (and used on the page) and uses a (multimodal) LLM to create textual descriptions/summaries for each image.
To improve the summary the XML of each confluence page is passed to the LLM as well as the title of the page and the name of the image. Each summary is stored as a new document, with the summary as the text of the section and the page of origin as link.
Additional a label that marks the content of the document as a summary (label: is_image_summary) is created to enable users to directly recognise summaries as such.
With this approach, the first multimodal functions can be integrated into the Confluence connector without having to fundamentally adapt the retrieval or general structure of documents in Danswer.
Multimodality can be activated using the environment variable CONFLUENCE_IMAGE_SUMMARIZATION_MULTIMODAL_ANSWERING.
If not used or false nothing will change, meaning no summaries will be generated and used for the answers.
If CONFLUENCE_IMAGE_SUMMARIZATION_MULTIMODAL_ANSWERING is set false after indexing with summaries all summaries will be ignored in retrieval.
Optionally users can set a custom system prompt (CONFLUENCE_IMAGE_SUMMARIZATION_SYSTEM_PROMPT) and user prompt (*
CONFLUENCE_IMAGE_SUMMARIZATION_USER_PROMPT*) as environment variables for the summarization. If not specified otherwise default prompts will be used.
How Has This Been Tested?
Accepted Risk (provide if relevant)
Related Issue(s) (provide if relevant)
N/A
Mental Checklist:
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.