example_selector=example_selector,    example_prompt=example_prompt,    prefix="Give the antonym of every input",    suffix="Input: {adjective}\nOutput:",    input_variables=["adjective"],)    Running Chroma using direct local API.    Using DuckDB in-memory for database. Data will be transient.# Input is a feeling, so should select the happy/sad exampleprint(similar_prompt.format(adjective="worried"))    Give the antonym of every input    Input: happy    Output: sad    Input: worried    Output:# Input is a measurement, so should select the tall/short exampleprint(similar_prompt.format(adjective="large"))    Give the antonym of every input    Input: tall    Output: short    Input: large    Output:# You can add new examples to the SemanticSimilarityExampleSelector as wellsimilar_prompt.example_selector.add_example({"input": "enthusiastic", "output": "apathetic"})print(similar_prompt.format(adjective="passionate"))    Give the antonym of every input    Input: enthusiastic    Output: apathetic    Input: passionate    Output:PreviousSelect by n-gram overlapNextLanguage modelsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
This object selects examples based on similarity to the inputs. It does this by finding the examples with the embeddings that have the greatest cosine similarity with the inputs.
This object selects examples based on similarity to the inputs. It does this by finding the examples with the embeddings that have the greatest cosine similarity with the inputs. ->: example_selector=example_selector,    example_prompt=example_prompt,    prefix="Give the antonym of every input",    suffix="Input: {adjective}\nOutput:",    input_variables=["adjective"],)    Running Chroma using direct local API.    Using DuckDB in-memory for database. Data will be transient.# Input is a feeling, so should select the happy/sad exampleprint(similar_prompt.format(adjective="worried"))    Give the antonym of every input    Input: happy    Output: sad    Input: worried    Output:# Input is a measurement, so should select the tall/short exampleprint(similar_prompt.format(adjective="large"))    Give the antonym of every input    Input: tall    Output: short    Input: large    Output:# You can add new examples to the SemanticSimilarityExampleSelector as wellsimilar_prompt.example_selector.add_example({"input": "enthusiastic", "output": "apathetic"})print(similar_prompt.format(adjective="passionate"))    Give the antonym of every input    Input: enthusiastic    Output: apathetic    Input: passionate    Output:PreviousSelect by n-gram overlapNextLanguage modelsCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.