AI-Studio/app/MindWork AI Studio/Tools/RAG/IRetrievalContext.cs
Thorsten Sommer 9587a07556
Some checks failed
Build and Release / Read metadata (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Has been cancelled
Build and Release / Prepare & create release (push) Has been cancelled
Build and Release / Publish release (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage deb updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Has been cancelled
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Has been cancelled
Showing sources coming from data providers (#559)
2025-09-25 19:47:18 +02:00

45 lines
1.7 KiB
C#

namespace AIStudio.Tools.RAG;
/// <summary>
/// The common interface for any retrieval context.
/// </summary>
public interface IRetrievalContext
{
/// <summary>
/// The name of the data source.
/// </summary>
/// <remarks>
/// This is not the name the user chooses but the name of the source where
/// the match was found. This could be a document or database name, a website
/// or a directory on a remote server, etc.
/// </remarks>
public string DataSourceName { get; init; }
/// <summary>
/// The category of the content, like e.g., text, audio, image, etc.
/// </summary>
public RetrievalContentCategory Category { get; init; }
/// <summary>
/// What type of content is being retrieved? Like e.g., a project proposal, spreadsheet, art, etc.
/// </summary>
public RetrievalContentType Type { get; init; }
/// <summary>
/// The path to the content, e.g., a URL, a file path, a path in a graph database, etc.
/// </summary>
public string Path { get; init; }
/// <summary>
/// Links to related content, e.g., links to Wikipedia articles, links to sources, etc.
/// </summary>
/// <remarks>
/// Why would you need links for retrieval? You are right that not all retrieval
/// contexts need links. But think about a web search feature, where we want to
/// query a search engine and get back a list of links to the most relevant
/// matches. Think about a continuous web crawler that is constantly looking for
/// new information and adding it to the knowledge base. In these cases, links
/// are essential.
/// </remarks>
public IReadOnlyList<string> Links { get; init; }
}