How to create a prompt to rank narrative analysis

My current prompt asks GPT-4 to create a visualising matrix based on scene similarity ranking after providing the scene description text file of the movie. I am asking to rate the similarity from the scale 0-1 to all the preceding scenes. So e.g., if it’s scene 5, GPT needs to rate how scene 1,2,3,4 is similar to 5 is on a 0 scale to 1.

The part that I am struggling with is GPT is solely rating the similarity between each scene e.g., (1 vs5, 2 vs5,3 vs 5). It does not rate the ranking based on having the “understanding” of each current on-going scene as a narrative structure. What I do want is: the “causal relevance” of how past scenes contributed to the relevance of current scenes of understanding.

Previous prompt was “You are an expert in narrative analysis, specializing in evaluating scene relevance and story coherence. You will be presented with a series of scenes from a story in order. Your task is to analyze and rank the causal relevance of the each current scene to all preceding scenes, considering the on-going narrative structure.”

And now I am considering this option:

prompt = f"""As an expert in narrative analysis, evaluate the causal relevance of the current scene to all preceding scenes in this ongoing story. Consider:

    1. Plot progression: How does this scene advance or relate to previous plot points?
    2. Character development: Are there meaningful changes or revelations about characters based on past events?
    3. Thematic connections: Does this scene reinforce or contrast with themes established earlier?
    4. Causal chains: Are there direct consequences of earlier scenes playing out here?
    5. Foreshadowing payoff: Does this scene fulfill any earlier foreshadowing?

    Previous scenes:
    {' '.join(accumulated_scenes[:-1])}

    Current scene to analyze:
    {current_scene}

    Provide a single relevance score as a number between 0 and 1, where 0 means no causal relevance to previous scenes, and 1 means high causal relevance and tight integration with the ongoing narrative.
    Return only the numerical score, without any additional text or explanation.
    """

Can someone help with my prompt which can better be structured so I can have better outcome?

1 Like

Might try giving it a one-shot example. With an example or two, 4o-mini might be able to handle it.

2 Likes