You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- markdown link destinations stay out of chunk text by default, but `HeadingAwareMarkdownChunker(linkDestinationMetadataMode: .include)` can record raw destinations in chunk metadata when downstream indexing or fetch-oriented work needs them
208
-
-`hashingDefault()` gives a deterministic local path for tests and examples
209
-
-`naturalLanguageDefault()` uses the Apple Natural Language backend on supported platforms
208
+
-`hashingDefault()` gives a synchronous deterministic local path for tests and examples
209
+
-`naturalLanguageDefault()` uses the Apple Natural Language backend on supported platforms and remains throwing because backend setup can fail
210
210
-`persistentHashingDefault(configuration:dimension:)` and `persistentNaturalLanguageDefault(configuration:languageHint:)` use the same retrieval defaults with a Core Data-backed semantic vector index
211
+
-`SwiftlyFetchLibrary.default()` is synchronous and non-throwing because it uses deterministic in-memory defaults; persistent constructors remain async and throwing
211
212
- metadata filtering supports explicit exclusions, ordered comparisons for `int`, `double`, and `date`, plus case-insensitive `startsWith` and `endsWith` string matching
212
213
- markdown list items keep heading and immediate lead-in context in chunk text, and also carry structured chunk metadata for list kind, lead-in, ordinal, and heading path
213
214
- markdown block quotes stay secondary by default, but are promoted into the primary retrieval stream when they make up more than one third of the document's chunkable block structure
Copy file name to clipboardExpand all lines: ROADMAP.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -228,9 +228,9 @@ In Progress
228
228
-[x] Plan the first `SwiftlyFetch` umbrella facade in maintainer docs.
229
229
-[x] Add a narrow bridge from `FetchDocumentRecord` to `RAGCore.Document`.
230
230
-[x] Add an umbrella ingestion surface only after the semantic persisted index is stable.
231
-
-[ ] Decide whether the remaining Core Data vector-index XCTest coverage should migrate to Swift Testing now that the current XCTest path is stable.
232
-
-[ ] Decide whether `KnowledgeBase.hashingDefault(dimension:)`should keep its current `async throws` shape for API consistency or become a synchronous non-throwing convenience in a future API polish pass.
233
-
-[ ] Decide when to optimize `CoreDataVectorIndex.search` beyond the current pragmatic v1 in-memory ranking path, such as by using Core Data fetch batching, predicate pre-filtering, or a future ANN-backed query path.
231
+
-[x] Keep the remaining Core Data vector-index coverage on XCTest because the framework-heavy Core Data lanes are stable there, while Swift Testing stays the default for ordinary package behavior.
232
+
-[x] Make `KnowledgeBase.hashingDefault(dimension:)`and `SwiftlyFetchLibrary.default()` synchronous and non-throwing because their deterministic in-memory construction paths have no async or throwing setup work.
233
+
-[x] Defer `CoreDataVectorIndex.search`optimization beyond the current pragmatic v1 in-memory ranking path until real corpus scale shows a need; likely future paths include Core Data fetch batching, predicate pre-filtering, or a future ANN-backed query path.
Copy file name to clipboardExpand all lines: docs/maintainers/hybrid-search-persistence-plan.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,6 +112,20 @@ The first convenience constructors are:
112
112
113
113
These constructors keep the same chunker and embedder defaults as the in-memory defaults while swapping in the Core Data-backed vector index.
114
114
115
+
The in-memory deterministic hashing constructor is intentionally synchronous and non-throwing:
116
+
117
+
-`KnowledgeBase.hashingDefault(dimension:)`
118
+
119
+
That constructor only assembles `DefaultChunker`, `HashingEmbedder`, and `InMemoryVectorIndex`, so it should not ask callers to write `try await`. Keep `naturalLanguageDefault(...)` throwing because the Apple Natural Language embedder can fail during setup, and keep the persistent constructors async/throwing because Core Data-backed vector index setup awaits persistent-store loading and can fail.
120
+
121
+
For the same reason, the umbrella `SwiftlyFetchLibrary.default()` constructor is synchronous and non-throwing while it uses only in-memory deterministic dependencies. Keep `SwiftlyFetchLibrary.macOSPersistentLibrary(...)` async/throwing because it opens persistent Core Data stores and may retry pending index work.
122
+
123
+
## Validation And Search Optimization Decisions
124
+
125
+
Keep the Core Data-backed semantic vector-index tests on XCTest for now. Swift Testing remains the default for ordinary package behavior, but the Core Data persistence lanes are framework-heavy and XCTest has been the stable runner after earlier Swift Testing executor-assumption failures in this repository's Core Data-backed validation. Treat this as an intentional validation boundary, not forgotten migration work.
126
+
127
+
Keep `CoreDataVectorIndex.search` on the current pragmatic v1 path until real corpus scale shows that it is too slow or too memory-heavy. The current backend loads persisted chunks, decodes embeddings, applies metadata filters, and ranks in memory behind the `VectorIndex` protocol. That is simple and correct for the current package stage. Likely future optimization paths are Core Data fetch batching, predicate pre-filtering for metadata filters, or a separate ANN-backed vector backend if corpus size eventually earns that extra storage/query complexity.
128
+
115
129
## Follow-Up Design Work
116
130
117
131
The next architecture work should focus on shared corpus ingestion rather than another standalone index backend. The detailed umbrella plan lives in [swiftlyfetch-facade-plan.md](./swiftlyfetch-facade-plan.md).
Copy file name to clipboardExpand all lines: docs/maintainers/retrieval-package-plan.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,7 +158,7 @@ Implemented today:
158
158
-`KnowledgeBase`
159
159
-`NaturalLanguageEmbedder`
160
160
-`AppleContextualEmbeddingBackend`
161
-
- convenience constructors for `hashingDefault()`, `naturalLanguageDefault()`, `persistentHashingDefault(configuration:dimension:)`, and `persistentNaturalLanguageDefault(configuration:languageHint:)`
161
+
- convenience constructors for synchronous deterministic `hashingDefault()`, throwing `naturalLanguageDefault()`, persistent `persistentHashingDefault(configuration:dimension:)`, and persistent`persistentNaturalLanguageDefault(configuration:languageHint:)`
162
162
- semantic index persistence now exists as a `RAGKit`-owned derived store through `CoreDataVectorIndex`, keeping semantic chunks and embeddings behind the existing `VectorIndex` protocol instead of pushing vector-storage concerns into `FetchKit`
163
163
- persisted semantic index health now exists as a `RAGKit` concern through document-level status and fingerprints, while retry scheduling remains reserved for the future umbrella ingestion surface
164
164
- markdown chunking now uses a parser-backed internal section model built on [swift-markdown](https://github.com/swiftlang/swift-markdown) instead of the earlier line-based heading scanner
0 commit comments