Pipeline

AlbaCore is the main entry point for a full backend search. Use it when a channel wrapper or test wants to run extraction, hard filtering, soft scoring, top-three ranking, and lead summary generation in one call.

class app.alba_core.pipeline.AlbaCore(property_cache_path: Path)[source]

Coordinates the full Alba Core search flow.

Read this file first when coding along. It shows the whole sequence while keeping detailed business rules in extraction.py, matching.py, and leads.py.

classmethod from_environment() AlbaCore[source]

Create Alba Core from ALBA_PROPERTY_CACHE or the default real seed.

search(message: str, current_requirements: dict[str, Any] | None = None) dict[str, Any][source]

Run one customer message through the complete Alba Core flow.

Example

from pathlib import Path

from app.alba_core.pipeline import AlbaCore

core = AlbaCore(Path("data/propertyme_property_seed_latest.json"))
result = core.search(
    "Find me a house in Auckland with 4 bedrooms under 5000"
)

print(result["search_ready"])
print(result["match_count"])
print(result["lead_summary"])

Environment-based setup

from app.alba_core.pipeline import AlbaCore

core = AlbaCore.from_environment()
result = core.search("Queenstown, 3 bedrooms, budget up to 5000, move ASAP")

for match in result["matches"]:
    print(match["property"]["address"], match["score"])