feat: implement semantic search, knowledge unit extraction, and visualization components

This commit is contained in:
2026-05-03 15:59:30 +02:00
parent 94ecc7a404
commit 1f187b5125
24 changed files with 844 additions and 21 deletions
@@ -0,0 +1,15 @@
using Microsoft.EntityFrameworkCore;
using NexusReader.Domain.Entities;
namespace NexusReader.Application.Abstractions.Persistence;
public interface IApplicationDbContext
{
DbSet<SemanticKnowledgeCache> SemanticKnowledgeCache { get; }
DbSet<KnowledgeUnit> KnowledgeUnits { get; }
DbSet<KnowledgeUnitLink> KnowledgeUnitLinks { get; }
DbSet<Ebook> Ebooks { get; }
DbSet<QuizResult> QuizResults { get; }
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}
@@ -7,6 +7,8 @@ public interface IKnowledgeService
{
Task<Result<KnowledgePacket>> GetKnowledgeAsync(string text, CancellationToken cancellationToken = default);
Task<Result<KnowledgePacket>> GetGraphDataAsync(string text, CancellationToken cancellationToken = default);
Task<Result<KnowledgePacket>> GetKnowledgeMapAsync(string text, CancellationToken cancellationToken = default);
Task<Result<KnowledgePacket>> GetSummaryAndQuizAsync(string text, CancellationToken cancellationToken = default);
Task<Result<List<RelevantContext>>> GetRelevantContextAsync(string query, string tenantId, CancellationToken cancellationToken = default);
Task<Result> ClearCacheAsync(CancellationToken cancellationToken = default);
}