Documentation
¶
Index ¶
- func DefaultGraphRetriever(opts ...Option) (core.Retriever, error)
- func NewRetriever(vectorStore core.VectorStore, graphStore store.GraphStore, ...) core.Retriever
- type CypherStep
- type EntityExtractionOption
- type Option
- func WithCustomStep(step pipeline.Step[*core.RetrievalContext]) Option
- func WithDepth(d int) Option
- func WithDocStore(s store.DocStore) Option
- func WithEmbedder(e embedding.Provider) Option
- func WithGraphStore(s store.GraphStore) Option
- func WithLLM(l chat.Client) Option
- func WithLimit(l int) Option
- func WithLogger(l logging.Logger) Option
- func WithPromptTemplate(t string) Option
- func WithTopK(k int) Option
- func WithTracer(t observability.Tracer) Option
- func WithVectorStore(s core.VectorStore) Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultGraphRetriever ¶ added in v1.1.3
DefaultGraphRetriever creates a Knowledge-Graph enabled retriever. It implements hybrid search combining vector similarity and graph neighbor traversal.
func NewRetriever ¶
func NewRetriever( vectorStore core.VectorStore, graphStore store.GraphStore, embedder embedding.Provider, llm chat.Client, opts ...Option, ) core.Retriever
NewRetriever creates a new GraphRAG retriever.
Types ¶
type CypherStep ¶
type CypherStep struct {
// contains filtered or unexported fields
}
CypherStep allows using Cypher templates for deep relationship retrieval. It is specifically designed for GraphStores that support Cypher (like Neo4j).
func NewCypherStep ¶
func NewCypherStep(store store.GraphStore, template string, logger logging.Logger) *CypherStep
NewCypherStep creates a new step for Cypher-based graph retrieval.
func (*CypherStep) Execute ¶
func (s *CypherStep) Execute(ctx context.Context, retrievalCtx *core.RetrievalContext) error
func (*CypherStep) Name ¶
func (s *CypherStep) Name() string
type EntityExtractionOption ¶ added in v1.1.3
type EntityExtractionOption func(*entityExtractionStep)
func WithFailOnError ¶ added in v1.1.3
func WithFailOnError(fail bool) EntityExtractionOption
type Option ¶
type Option func(*Options)
func WithCustomStep ¶
func WithCustomStep(step pipeline.Step[*core.RetrievalContext]) Option
func WithDocStore ¶
func WithEmbedder ¶ added in v1.1.3
func WithGraphStore ¶ added in v1.1.3
func WithGraphStore(s store.GraphStore) Option
func WithLogger ¶
func WithPromptTemplate ¶
func WithTracer ¶
func WithTracer(t observability.Tracer) Option
func WithVectorStore ¶ added in v1.1.3
func WithVectorStore(s core.VectorStore) Option
Click to show internal directories.
Click to hide internal directories.