Skip to content
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

Add Citations in User UI Chat #1756

Open
cjellick opened this issue Feb 14, 2025 · 2 comments
Open

Add Citations in User UI Chat #1756

cjellick opened this issue Feb 14, 2025 · 2 comments
Assignees

Comments

@cjellick
Copy link
Contributor

Feature Request: Add Citations in User UI Chat

Description:
Implement a feature to add citation links at the bottom of messages in the user UI chat. This will provide users with sources for the information presented, similar to other AI chat applications.

Approach:

  • List of Sources: Initially, implement a simple list of sources at the end of the content. This approach is preferred for the first pass as it is programmatic and straightforward.
  • Unique Identifiers: Consider using unique identifiers for citations to avoid conflicts with standard LLM responses.

Discussion Points:

  • There was a suggestion to filter out unused sources, meaning only listing sources that the LLM actually used.
  • The team agreed to start by listing all sources passed to the LLM and evaluate its effectiveness before considering more complex solutions.

References:

Note:
There might already be an existing issue titled "add citations." Please check for any existing issues before proceeding with this implementation.

@cjellick
Copy link
Contributor Author

Additional Context from Slack Discussion

Issue with Knowledge Files:

  • It was noted that when files are uploaded to the knowledge-files for an agent, the subsequent queries to knowledge do not have the URL set in the response, resulting in no references to render citations.

Proposed Solution:

  • A pull request (PR #428) was proposed to add file source and location metadata to knowledge results. This change introduces a url field and a location field to provide more context.

Discussion on URL Handling:

  • There was a discussion about the need for URLs to be properly formatted before the LLM sees them, as the LLM forms citations based on these URLs.
  • A suggestion was made to have a route in the API that exposes knowledge files, similar to how image URLs are handled.

API Considerations:

  • The API exists for knowledge files but needs to support singular file access. It was confirmed that the knowledge tool should return URLs that can be resolved to the API, allowing for downloading or opening source files.

Next Steps:

  • TK was tasked with adding the necessary API support, following the pattern for accessing workspace files on a thread.

This context is related to the feature request for adding citations in the user UI chat.

@cjellick
Copy link
Contributor Author

@ryanhopperlowe - this was opened via AI. not sure if you already have a ticket for it, but feel free to use or close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants