<p>A sentence is composed words, so you can indeed predict the next sentence by predicting words sequentially. There are models, such as the one described in <a href="http://arxiv.org/abs/1507.07998" rel="nofollow">this</a> paper, that build embeddings for entire paragraphs, which can be useful for your purpose. Of course there is <a href="http://arxiv.org/abs/1506.05869" rel="nofollow">Neural Conversational Model</a> work that probably directly fits your need. TensorFlow doesn't ship with working examples of these models, but the recurrent models that come with TensorFlow should give you a good starting point for implementing them.</p>
Building a conversational model using TensorFlow
<p>I'd like to build a conversational modal that can predict a sentence using the previous sentences using TensorFlow LSTMs . The example provided in TensorFlow tutorial can be used to predict the next word in a sentence .</p>

<p><a href="https://www.tensorflow.org/versions/v0.6.0/tutorials/recurrent/index.html" rel="nofollow noreferrer">https://www.tensorflow.org/versions/v0.6.0/tutorials/recurrent/index.html</a></p>

<pre class="lang-py prettyprint-override"><code>lstm = rnn_cell.BasicLSTMCell(lstm_size)
# Initial state of the LSTM memory.
state = tf.zeros([batch_size, lstm.state_size])

loss = 0.0
for current_batch_of_words in words_in_dataset:
    # The value of state is updated after processing each batch of words.
    output, state = lstm(current_batch_of_words, state)

    # The LSTM output can be used to make next word predictions
    logits = tf.matmul(output, softmax_w) + softmax_b
    probabilities = tf.nn.softmax(logits)
    loss += loss_function(probabilities, target_words)
</code></pre>

<p>Can I use the same technique to predict the next sentence ? Is there any working example on how to do this ? </p>