anthropic-cookbook
anthropic-cookbook copied to clipboard
Nit: prepend contextual text instead of appending it to chunks in guide.ipynb
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']}"