Packages

Production adapters and pipelines for PortfolioCore. Vector stores, graph stores, embedders, Broadway pipelines, and advanced RAG strategies.

Current section

6 Versions

Jump to

Compare versions

14 files changed
+326 additions
-38 deletions
  @@ -7,11 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7 7
8 8 ## [Unreleased]
9 9
10 + ## [0.1.1] - 2025-12-27
11 +
12 + ### Added
13 +
14 + - OpenAI embedder adapter placeholder (`PortfolioIndex.Adapters.Embedder.OpenAI`)
15 + - Anthropic LLM adapter placeholder (`PortfolioIndex.Adapters.LLM.Anthropic`)
16 + - `AdapterResolver` for dynamic adapter resolution from context or registry
17 + - Agentic RAG strategy placeholder (`PortfolioIndex.RAG.Strategies.Agentic`)
18 + - GraphRAG strategy placeholder (`PortfolioIndex.RAG.Strategies.GraphRAG`)
19 + - `enqueue/2` function to Ingestion pipeline for ad-hoc file indexing
20 +
21 + ### Changed
22 +
23 + - Pgvector adapter: idempotent index creation with dimension validation
24 + - Pgvector adapter: normalize metric and index type from string or atom inputs
25 + - Application startup: conditional child process loading via config flags
26 + - Hybrid and SelfRAG strategies now use AdapterResolver for dynamic adapter selection
27 + - Updated `portfolio_core` dependency to `~> 0.1.1`
28 +
10 29 ## [0.1.0] - 2025-12-27
11 30
12 31 ### Added
13 32
14 33 - Initial release of PortfolioIndex
15 34
16 - [Unreleased]: https://github.com/nshkrdotcom/portfolio_core/compare/v0.1.0...HEAD
17 - [0.1.0]: https://github.com/nshkrdotcom/portfolio_core/releases/tag/v0.1.0
35 + [Unreleased]: https://github.com/nshkrdotcom/portfolio_index/compare/v0.1.1...HEAD
36 + [0.1.1]: https://github.com/nshkrdotcom/portfolio_index/compare/v0.1.0...v0.1.1
37 + [0.1.0]: https://github.com/nshkrdotcom/portfolio_index/releases/tag/v0.1.0
  @@ -75,7 +75,7 @@ Add `portfolio_index` to your list of dependencies in `mix.exs`:
75 75 ```elixir
76 76 def deps do
77 77 [
78 - {:portfolio_index, "~> 0.1.0"}
78 + {:portfolio_index, "~> 0.1.1"}
79 79 ]
80 80 end
81 81 ```
  @@ -235,12 +235,14 @@ config :boltx, Boltx,
235 235 | Adapter | Provider | Model |
236 236 |---------|----------|-------|
237 237 | `Gemini` | Google | text-embedding-004 (768 dims) |
238 + | `OpenAI` | OpenAI | text-embedding-3-small/large (placeholder) |
238 239
239 240 ### LLM
240 241
241 242 | Adapter | Provider | Model |
242 243 |---------|----------|-------|
243 244 | `Gemini` | Google | gemini-2.5-flash |
245 + | `Anthropic` | Anthropic | claude-3-sonnet (placeholder) |
244 246
245 247 ### Chunker
246 248
  @@ -254,6 +256,8 @@ config :boltx, Boltx,
254 256 |----------|-------------|
255 257 | `Hybrid` | Vector + keyword search with Reciprocal Rank Fusion |
256 258 | `SelfRAG` | Retrieval with self-critique and answer refinement |
259 + | `Agentic` | Agentic retrieval (placeholder, delegates to Hybrid) |
260 + | `GraphRAG` | Graph-aware retrieval (placeholder, delegates to Hybrid) |
257 261
258 262 ## Architecture
259 263
  @@ -265,10 +269,12 @@ config :boltx, Boltx,
265 269 │ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ │
266 270 │ │ Vector Store │ │ Graph Store │ │ Embedder │ │
267 271 │ │ • Pgvector │ │ • Neo4j │ │ • Gemini │ │
272 + │ │ │ │ │ │ • OpenAI │ │
268 273 │ └───────────────┘ └───────────────┘ └───────────────┘ │
269 274 │ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ │
270 275 │ │ LLM │ │ Chunker │ │ Document Store│ │
271 276 │ │ • Gemini │ │ • Recursive │ │ • Postgres │ │
277 + │ │ • Anthropic │ │ │ │ │ │
272 278 │ └───────────────┘ └───────────────┘ └───────────────┘ │
273 279 ├─────────────────────────────────────────────────────────────┤
274 280 │ Pipelines (Broadway) │
  @@ -282,6 +288,10 @@ config :boltx, Boltx,
282 288 │ │ Hybrid │ │ Self-RAG │ │
283 289 │ │ Vector + RRF fusion│ │ Critique + Refine │ │
284 290 │ └────────────────────┘ └────────────────────┘ │
291 + │ ┌────────────────────┐ ┌────────────────────┐ │
292 + │ │ Agentic │ │ GraphRAG │ │
293 + │ │ (placeholder) │ │ (placeholder) │ │
294 + │ └────────────────────┘ └────────────────────┘ │
285 295 └─────────────────────────────────────────────────────────────┘
286 296
287 297
  @@ -1,7 +1,7 @@
1 1 {<<"links">>,
2 2 [{<<"GitHub">>,<<"https://github.com/nshkrdotcom/portfolio_index">>}]}.
3 3 {<<"name">>,<<"portfolio_index">>}.
4 - {<<"version">>,<<"0.1.0">>}.
4 + {<<"version">>,<<"0.1.1">>}.
5 5 {<<"description">>,
6 6 <<"Production adapters and pipelines for PortfolioCore. Vector stores, graph stores, embedders, Broadway pipelines, and advanced RAG strategies.">>}.
7 7 {<<"elixir">>,<<"~> 1.15">>}.
  @@ -21,7 +21,9 @@
21 21 <<"lib/portfolio_index/adapters/chunker/recursive.ex">>,
22 22 <<"lib/portfolio_index/adapters/embedder">>,
23 23 <<"lib/portfolio_index/adapters/embedder/gemini.ex">>,
24 + <<"lib/portfolio_index/adapters/embedder/open_ai.ex">>,
24 25 <<"lib/portfolio_index/adapters/llm">>,
26 + <<"lib/portfolio_index/adapters/llm/anthropic.ex">>,
25 27 <<"lib/portfolio_index/adapters/llm/gemini.ex">>,
26 28 <<"lib/portfolio_index/adapters/vector_store">>,
27 29 <<"lib/portfolio_index/adapters/vector_store/pgvector.ex">>,
  @@ -33,9 +35,12 @@
33 35 <<"lib/portfolio_index/pipelines/producers/file_producer.ex">>,
34 36 <<"lib/portfolio_index/pipelines/producers/ets_producer.ex">>,
35 37 <<"lib/portfolio_index/rag">>,<<"lib/portfolio_index/rag/strategy.ex">>,
38 + <<"lib/portfolio_index/rag/adapter_resolver.ex">>,
36 39 <<"lib/portfolio_index/rag/strategies">>,
40 + <<"lib/portfolio_index/rag/strategies/agentic.ex">>,
37 41 <<"lib/portfolio_index/rag/strategies/hybrid.ex">>,
38 42 <<"lib/portfolio_index/rag/strategies/self_rag.ex">>,
43 + <<"lib/portfolio_index/rag/strategies/graph_rag.ex">>,
39 44 <<"lib/portfolio_index/repo.ex">>,<<"assets">>,
40 45 <<"assets/portfolio_index.svg">>,<<".formatter.exs">>,<<"mix.exs">>,
41 46 <<"README.md">>,<<"LICENSE">>,<<"CHANGELOG.md">>]}.
  @@ -43,7 +48,7 @@
43 48 [[{<<"name">>,<<"portfolio_core">>},
44 49 {<<"app">>,<<"portfolio_core">>},
45 50 {<<"optional">>,false},
46 - {<<"requirement">>,<<"~> 0.1.0">>},
51 + {<<"requirement">>,<<"~> 0.1.1">>},
47 52 {<<"repository">>,<<"hexpm">>}],
48 53 [{<<"name">>,<<"ecto_sql">>},
49 54 {<<"app">>,<<"ecto_sql">>},
  @@ -0,0 +1,32 @@
1 + defmodule PortfolioIndex.Adapters.Embedder.OpenAI do
2 + @moduledoc """
3 + OpenAI embeddings adapter placeholder.
4 +
5 + This adapter satisfies the `PortfolioCore.Ports.Embedder` behaviour but
6 + does not implement actual API calls yet.
7 + """
8 +
9 + @behaviour PortfolioCore.Ports.Embedder
10 +
11 + require Logger
12 +
13 + @impl true
14 + def embed(_text, _opts) do
15 + Logger.error("OpenAI embedder adapter not implemented")
16 + {:error, :not_implemented}
17 + end
18 +
19 + @impl true
20 + def embed_batch(_texts, _opts) do
21 + Logger.error("OpenAI embedder adapter not implemented")
22 + {:error, :not_implemented}
23 + end
24 +
25 + @impl true
26 + def dimensions(_model), do: 1536
27 +
28 + @impl true
29 + def supported_models do
30 + ["text-embedding-3-small", "text-embedding-3-large"]
31 + end
32 + end
  @@ -0,0 +1,34 @@
1 + defmodule PortfolioIndex.Adapters.LLM.Anthropic do
2 + @moduledoc """
3 + Anthropic LLM adapter placeholder.
4 +
5 + This adapter satisfies the `PortfolioCore.Ports.LLM` behaviour but
6 + does not implement actual API calls yet.
7 + """
8 +
9 + @behaviour PortfolioCore.Ports.LLM
10 +
11 + require Logger
12 +
13 + @impl true
14 + def complete(_messages, _opts) do
15 + Logger.error("Anthropic LLM adapter not implemented")
16 + {:error, :not_implemented}
17 + end
18 +
19 + @impl true
20 + def stream(_messages, _opts) do
21 + Logger.error("Anthropic LLM adapter not implemented")
22 + {:error, :not_implemented}
23 + end
24 +
25 + @impl true
26 + def supported_models do
27 + ["claude-3-sonnet-20240229"]
28 + end
29 +
30 + @impl true
31 + def model_info(_model) do
32 + %{context_window: 200_000, max_output: 4096, supports_tools: false}
33 + end
34 + end
Loading more files…