anthropic-cookbook icon indicating copy to clipboard operation
anthropic-cookbook copied to clipboard

Nit: prepend contextual text instead of appending it to chunks in guide.ipynb

Open FlorianPydde opened this issue 5 months ago • 0 comments

In your blob post, you mention that your prepend the context to the actual chunk but in the guide notebook it's the opposite. It probably doesn't affect performances but for consistency I thought I would raise it.

The line in question is this one (guide): Current:

'text_to_embed': f"{chunk['content']}\n\n{contextualized_text}"

Corrected:

'text_to_embed': f"{contextualized_text}\n\n{chunk['content']}"

FlorianPydde avatar Sep 22 '24 09:09 FlorianPydde