A decision guide as code
A thinking tool, not an oracle: the order of the rules and the 'half of memory' limit are assumptions to change for your own situation.
Choose from what you already run, how big your data is, which filters and keyword search you need and who will operate it. Put the store behind an interface so the choice can be reversed.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 5 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
Add a field must_self_host to the idea of the guide and write recommend2(profile) that returns "self-hosted dedicated" whenever it is true and the data does not fit in one process, and otherwise calls your earlier rules. Print the answer for a profile with must_self_host=True, fits=False.
List the methods your application needs from a store for AskDocs (at least four) and write a Python Protocol or abstract class VectorStore with them. Print the method names.
Explain it without notes
Why is "what do we already run?" the first question?
How does an interface keep the choice reversible?
Why not trust a published benchmark to choose a store?
When is an embedded library the right answer?
Expected output
A handbook bot: 8.4 MB -> an embedded library or a plain file
B product with PostgreSQL: 3344.0 MB -> pgvector in the PostgreSQL you already run
C big vectors, has a search engine: 12560.0 MB -> vector fields in your search engine (keyword and vector in one query)
D huge, no ops team: 501600.0 MB -> a managed dedicated vector database
E huge, with ops team: 501600.0 MB -> a self-hosted dedicated vector database