from functions import retrieval_from_knowledge_base

def retrieve_nanocube_preparation(query, topk=3):
    """
    Retrieves information on the preparation of CsPbBr3 nanocubes at room temperature.

    Parameters:
    query (str): The query string about the preparation process.
    topk (int): The number of top results to return.

    Returns:
    str: The relevant information in JSON format.
    """
    try:
        # Execute retrieval function with the query and topk value
        result = retrieval_from_knowledge_base(query, topk)
        return result
    except Exception as e:
        return f"An error occurred while retrieving information: {str(e)}"

# Define the query
query = "Room-temperature synthesis of CsPbBr3 nanocubes"

# Perform retrieval
retrieval_result = retrieve_nanocube_preparation(query)

# Print the result
print(retrieval_result)