Embedding recency
Node PostProcessor module.
EmbeddingRecencyPostprocessor #
Bases: BaseNodePostprocessor
Embedding Recency post-processor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
embed_model
|
BaseEmbedding
|
|
<dynamic>
|
date_key
|
str
|
|
'date'
|
similarity_cutoff
|
float
|
|
0.7
|
query_embedding_tmpl
|
str
|
|
'The current document is provided.\n----------------\n{context_str}\n----------------\nGiven the document, we wish to find documents that contain \nsimilar context. Note that these documents are older than the current document, meaning that certain details may be changed. \nHowever, the high-level context should be similar.\n'
|
Source code in llama-index-core/llama_index/core/postprocessor/node_recency.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
|