Evaluations sample architecture
Source-backed, high-level architecture notes for Apple sample-code pages grouped in the Evaluations folder.
- Catalog module label:
Evaluations - Coverage: 2 / 2 sample pages documented
- Source policy: archive hashes and extracted-tree references are verified locally before analysis
Samples
| Sample | Platforms | High-level architecture | Documented patterns |
|---|---|---|---|
| Book Tracker: Using Evaluations to evaluate an intelligent feature | iOS, iPadOS, Mac Catalyst | Five Xcode targets. The SwiftUI app (BookTracker) keeps model calls in two seams: BookTaggingService.generateTags(for:) and the three Tool structs in BookSearchTools.swift. Two hosted test bundles (BookTrackerTests, HillClimbingEvaluations) and a macOS tool (BookSampleGenerator) call or compile those same seams. A second macOS tool (DatasetExtractor) post-processes evaluation results. |
Service object, Actor isolation |
| Evaluating a Core AI model | macOS | Two Xcode targets. A small SwiftUI macOS app (CoreAIEvals): one view owns an @Observable screen model, which calls a stateless SentimentClassifier service. A unit-test bundle (CoreAIEvalsTests) hosted by the app reuses that same service as the evaluation subject. |
Service object, Actor isolation, Binding-based state propagation |
Cross-sample signals
Recurring documented patterns
| Pattern label | Sample documents |
|---|---|
| Service object | 2 |
| Actor isolation | 2 |
Type-role naming evidence
Counts below are declaration-name suffixes, not inferred patterns.
| Role suffix | Distinct declarations across samples |
|---|---|
View |
9 |
App |
2 |
Command |
1 |
Service |
1 |
Model |
1 |
Store |
1 |
Swift access-control evidence
These are declaration occurrences in scanned Swift source, including implicit internal declarations.
| Access level | Occurrences |
|---|---|
implicit internal |
450 |
private |
72 |
fileprivate |
1 |
private(set) |
1 |
References
Generated from the verified local catalog and completed Markdown documents.