Skip to content

Implement backlog issues 021, 025, 028: vector store abstraction, citation capture, user profile extraction#40

Merged
matt-goldman merged 5 commits intomainfrom
copilot/delegate-backlog-items
Feb 28, 2026
Merged

Implement backlog issues 021, 025, 028: vector store abstraction, citation capture, user profile extraction#40
matt-goldman merged 5 commits intomainfrom
copilot/delegate-backlog-items

Conversation

Copy link
Contributor

Copilot AI commented Feb 28, 2026

Three independent backlog items with no interdependencies, implemented in parallel via sub-agents.

Issue 021 — Abstract Vector Store Interface

Replaces the Qdrant-coupled IQdrantService with a provider-agnostic IVectorStore abstraction, mirroring the existing LlmOptions pattern.

  • IQdrantServiceIVectorStore, QdrantSearchResultVectorSearchResult, QdrantServiceQdrantVectorStore
  • New VectorStoreOptions with Provider config key; startup selects implementation via switch (only "Qdrant" for now)
  • All consumers (RagService, EmbeddingService, SearchMemoriesTool, endpoints) and test fakes updated

Issue 025 — Capture Citations and Content References

Parses and stores metadata.citations[] and metadata.content_references[] from ChatGPT export messages (previously dropped entirely).

  • New JSON models MessageCitation, CitationMetadata, MessageContentReference on MessageMetadata
  • New stored models StoredCitation, StoredContentReference on StoredMessage; populated in StoredMessage.From()
  • hidden content references filtered at parse time (internally generated, not useful for RAG)
  • BuildEmbeddingText() appends [Cited: <name/url>] lines so file/web source attribution contributes to embedding context

Issue 028 — Extract User Profile from Custom Instructions

Extracts the latest user_editable_context content (ChatGPT custom instructions) during import and surfaces it as personalisation context in chat.

  • New UserProfile MongoDB model (single document, fixed Id = "user-profile"); IUserProfileRepository / UserProfileRepository
  • ImportProcessingService scans messages during import, upserts only if create_time is newer than what's stored
  • RagService.BuildMessages() accepts optional UserProfile?; injects a === USER CONTEXT === block into the system prompt with "About the user" and "User's preferences for responses" sections
  • user_editable_context messages already excluded from embedding via existing IsHidden filter — no change needed there

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 4 commits February 28, 2026 00:59
… (Issue 021)

- Rename QdrantSearchResult → VectorSearchResult
- Rename IQdrantService → IVectorStore
- Rename QdrantService → QdrantVectorStore
- Add VectorStoreOptions with Provider config key
- Update Program.cs to use switch-driven IVectorStore registration
- Add VectorStore section to appsettings.json
- Update all consumers: RagService, EmbeddingService, SearchMemoriesTool,
  SearchEndpoints, DiagnosticsEndpoints
- Update all test fakes: FakeVectorStore, ThrowingVectorStore,
  FakeSearchVectorStore, ThrowingSearchVectorStore
- All 150 tests pass

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add MessageCitation, CitationMetadata, MessageContentReference to ChatGptExport.cs
- Add Citations and ContentReferences properties to MessageMetadata
- Add StoredCitation and StoredContentReference model classes
- Add Citations and ContentReferences properties to StoredMessage
- Parse citations and non-hidden content references in StoredMessage.From()
- Include citation name/URL context in BuildEmbeddingText()
- Add unit tests for citation parsing, content reference filtering, and embedding citation context

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…citation name lookup

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add UserProfile model with UserProfileText, UserInstructions, SourceCreateTime, LastUpdated
- Add IUserProfileRepository interface and UserProfileRepository MongoDB implementation
- Update ImportProcessingService to scan user_editable_context messages during import
  and store the latest user profile (by create_time) via TryUpdateUserProfileAsync
- Update RagService.BuildMessages to accept optional UserProfile parameter and include
  USER CONTEXT section in system prompt when profile data is present
- ChatAsync and ChatStreamAsync fetch user profile from repository and pass to BuildMessages
- Register IUserProfileRepository/UserProfileRepository as singleton in Program.cs
- Add FakeUserProfileRepository to test helpers
- Add UserProfileTests: BuildMessages profile injection and import extraction tests
- Update ImportProcessingService tests to pass FakeUserProfileRepository
- Mark issue 028 Done; update docs/index.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI changed the title [WIP] Delegate independent backlog items to individual agents Implement backlog issues 021, 025, 028: vector store abstraction, citation capture, user profile extraction Feb 28, 2026
@matt-goldman matt-goldman marked this pull request as ready for review February 28, 2026 02:28
Copy link
Owner

@matt-goldman matt-goldman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - tested and ran locally. All working, identified the next batch of issues.

@matt-goldman matt-goldman merged commit f5eece9 into main Feb 28, 2026
1 check passed
@matt-goldman matt-goldman deleted the copilot/delegate-backlog-items branch February 28, 2026 02:29
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

Successfully merging this pull request may close these issues.

2 participants